element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experts, Learning and Guidance
  • Technologies
  • More
Experts, Learning and Guidance
Ask an Expert Forum Linking issues with gcc.exe when using <bitlib.h> library
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experts, Learning and Guidance to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 18 replies
  • Subscribers 301 subscribers
  • Views 372 views
  • Users 0 members are here
Related
See a helpful answer?

Be sure to click 'more' and select 'suggest as answer'!

If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!

Linking issues with gcc.exe when using <bitlib.h> library

ArminAIM
ArminAIM 5 days ago

Hi,

This is the compiler settings I am using on Embarcadero Dev-C++.....

image

This is my code (which is actually an example code from the bitscope micro people)

/* report.c -- BitLib 2.0 Capture Device Report Generator (ANSI C)
 * See User Programming Manual for information about these calls.*/


#include <stdio.h>
#include <limits.h>
#include <bitlib.h>

 /* required */


#define MY_DEVICES 1 /* change this if you have more than one */
#define MY_PROBE_FILE "" /* default probe file if unspecified */



const char * MODES[] = {"FAST","DUAL","MIXED","LOGIC","STREAM"};
const char * SOURCES[] = {"POD","BNC","X10","X20","X50","ALT","GND"};

int main(int argc, char *argv[]) {
    int N;
    

   /*
    * Open the first device found (only)
    */
    printf("\nStarting: Attempting to open %d device%s...",MY_DEVICES,MY_DEVICES!=1?"s":"");
    if ( (N = BL_Open(MY_PROBE_FILE,MY_DEVICES)) ) {
        int i;
       /*
        * Open succeeded, report library version and for each device...
        */
        printf("\n Library: %s (report.c)\n",BL_Version(BL_VERSION_LIBRARY));
        printf("  Opened: %d Device%s\n",N,N!=1?"s":"");
        for ( i = 0; i < N; i++ ) {
            int j;
           /*
            * Select the device (all following functions talk to this device).
            */
            BL_Select(BL_SELECT_DEVICE,i);
           /*
            * Report the device, link and available channels.
            */
            printf("\nBitScope: %s (%s)\n",BL_ID(),BL_Version(BL_VERSION_DEVICE));
            { char name[100]; printf("    Link: %s\n",BL_Name(name)); }
            printf("Channels: %d (%d analog + %d logic)\n",
                   BL_Count(BL_COUNT_ANALOG)+BL_Count(BL_COUNT_LOGIC),
                   BL_Count(BL_COUNT_ANALOG),BL_Count(BL_COUNT_LOGIC));
           /*
            * Determine which modes the device supports.
            */
            printf("   Modes:");
            for ( j = BL_MODE_FAST; j <= BL_MODE_STREAM; j++ )
                if ( BL_Mode(j) == j ) printf(" %s",MODES[j]);
           /*
            * Report canonic capture specification in LOGIC (if supported) or FAST mode (otherwise).
            */
            if ( BL_Mode(BL_MODE_LOGIC) == BL_MODE_LOGIC || BL_Mode(BL_MODE_FAST) == BL_MODE_FAST )
                printf("\n Capture: %d @ %.0fHz = %fs (%s)\n",BL_Size(BL_ASK),
                       BL_Rate(BL_ASK), BL_Time(BL_ASK),MODES[BL_Mode(BL_ASK)]);
           /*
            * Report the maximum offset range (if the device supports offsets).
            */
            BL_Range(BL_Count(BL_COUNT_RANGE)); /* highest range */
            if ( BL_Offset(INT_MIN) != BL_Offset(INT_MAX) ) /* supports offsets */
                printf("  Offset: %+.4gV to %+.4gV\n",BL_Offset(INT_MAX), BL_Offset(INT_MIN));
           /*
            * Report the sources provided by the device and their respective ranges.
            */
            for ( j = BL_SOURCE_POD; j <= BL_SOURCE_GND; j++ ) {
                int k, n = BL_Count(BL_COUNT_RANGE);
                if ( j == BL_Select(BL_SELECT_SOURCE,j) ) {
                    printf("     %s:",SOURCES[j]);
                    for ( k = n-1; k >= 0; k-- )
                        printf(" %5.2fV",BL_Range(k));
                    printf("\n");
                }
            }
        }
    }
    printf("\n");
    BL_Close();
    return 0;
}

I have copied all the files from the "Bitscope" folder to my working folder with the ".c" file in it.

And then this is what I get when I try to compile.

Any help would be so much appreciated thanks!!

image

  • Sign in to reply
  • Cancel

Top Replies

  • Jan Cumps
    Jan Cumps 5 days ago in reply to ArminAIM +3
    use <> includes only for C and its standard library includes. For your own project include files (also ones you copied into your project folder from 3rd parties), use "". #include <stdio.h> #include…
  • obones
    obones 5 days ago +1
    Hello Could you show us the file/folder structure that you have? Usually, when a toolchain complain at the linking stage, it's because of one of two things: 1. The required ".a" file cannot be found…
  • beacon_dave
    beacon_dave 5 days ago in reply to Jan Cumps +1
    Jan Cumps said: The extensions aren't hidden I think they are for 'known file types' e.g. Jan Cumps said: I think it's an edited printscreen I think the 'stitch line' two thirds of the way…
Parents
  • shabaz
    0 shabaz 5 days ago

    Just to throw another idea out there, it might also be worth considering say Matlab or Labview or Python, and just process the captured data with that (or connect using SCPI but maybe that instrument doesn't support that). 

    Python etc is great for data analysis.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • shabaz
    0 shabaz 5 days ago

    Just to throw another idea out there, it might also be worth considering say Matlab or Labview or Python, and just process the captured data with that (or connect using SCPI but maybe that instrument doesn't support that). 

    Python etc is great for data analysis.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube