Compile errors using visual studio to compile demo code

 
Post new topic   Reply to topic    Pico Technology Forum Index -> PicoScope
Author Message
surf3rb0y
Active User
Active User


Joined: 21 Nov 2005
Posts: 8

PostPosted: Mon Nov 21, 2005 6:57 pm    Post subject: Compile errors using visual studio to compile demo code Reply with quote

compile errors include the following.

Im using visual studio 6.0 to compile.
-------------------Configuration: ps3000 - Win32 Debug--------------------
Linking...
ps3000.obj : error LNK2001: unresolved external symbol __imp__ps3000_close_unit@4
ps3000.obj : error LNK2001: unresolved external symbol __imp__ps3000_set_siggen@32
ps3000.obj : error LNK2001: unresolved external symbol __imp__ps3000_get_times_and_values@36
ps3000.obj : error LNK2001: unresolved external symbol __imp__ps3000_stop@4
ps3000.obj : error LNK2001: unresolved external symbol __imp__ps3000_ready@4
ps3000.obj : error LNK2001: unresolved external symbol __imp__ps3000_run_block@20
ps3000.obj : error LNK2001: unresolved external symbol __imp__ps3000_get_timebase@28
ps3000.obj : error LNK2001: unresolved external symbol __imp__ps3000_set_ets@16
ps3000.obj : error LNK2001: unresolved external symbol __imp__ps3000_set_trigger@24
ps3000.obj : error LNK2001: unresolved external symbol __imp__ps3000_set_channel@20
ps3000.obj : error LNK2001: unresolved external symbol __imp__ps3000_get_unit_info@16
ps3000.obj : error LNK2001: unresolved external symbol __imp__ps3000_open_unit@0
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/ps3000.exe : fatal error LNK1120: 13 unresolved externals
Error executing link.exe.

ps3000.exe - 14 error(s), 0 warning(s)

Not sure why have tryed reinstalling and compiling with new files but no luck.

Thanks in advance for any help you can offer.

Tyler
Back to top
Sarah
Guest





PostPosted: Tue Nov 22, 2005 1:14 pm    Post subject: Reply with quote

Hi Tyler

It looks as though it is not finding the .lib file. Have you included the ps3000.lib file in the resources?

Best Regards
Back to top
surf3rb0y
Active User
Active User


Joined: 21 Nov 2005
Posts: 8

PostPosted: Tue Nov 22, 2005 4:49 pm    Post subject: Reply with quote

Thanks for the reply Sarah,
not sure how to add that file

Tried to just put an #include "ps3000.lib" in the ps3000.c file but that resulted in more errors. Thanks for any help you can offer.

Tyler
Back to top
Sarah
Guest





PostPosted: Wed Nov 23, 2005 1:26 pm    Post subject: Reply with quote

Hi Tyler

The file needs to be added in the solution explorer under the resources section - it does not need to be referenced in the code.

Also make sure you have the header file also in the solution explorer.

Best Regards
Back to top
surf3rb0y
Active User
Active User


Joined: 21 Nov 2005
Posts: 8

PostPosted: Mon Nov 28, 2005 3:45 pm    Post subject: Reply with quote

Thanks for the help that fixed all but 2 of my errors. now i get the following

"--------------------Configuration: ps3000 - Win32 Debug--------------------
Linking...
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/ps3000.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

ps3000.exe - 2 error(s), 0 warning(s)"

ive tried to iinclude other files that i thought might be missing but didn't help at all.
Thanks
Back to top
surf3rb0y
Active User
Active User


Joined: 21 Nov 2005
Posts: 8

PostPosted: Mon Dec 12, 2005 5:18 pm    Post subject: Fixed.... Reply with quote

I found the answer to my previous question. the program was being compiled as a consol app and not a windows app. I believe that this only affects visual studio 6 but could be experienced in other versions as well the solution can be found here. http://support.microsoft.com/?scid=kb;en-us;291952&spid=3042&sid=220

Thanks for all the help.

Tyler
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Pico Technology Forum Index -> PicoScope
All times are GMT
Page 1 of 1

 


Pico Technology topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group