Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with dev cpp

Check in your compiler' settings if there is something about a compatibility mode for your linker.

 

You could also load the DLL dynamically if you know how to do it. If you don't, I invite you to click on this following link : DLLs the dynamic Ways

 

This is for MSDN but you should find something similar for GCC. There it is a useful link : Linking Windows dll with GCC and do the Explicit Linking stuff because we do not supply a gcc compatible import library for static linking.

 

Do you have the possibility to use MSC? If you can, you would have access to a free compiler. And It would avoid you to load your dll dynamically. Try a free version : MSVC Free Version (There is a command line version if you prefer).

 

I would like to know why you have decided to use GCC on a 32bits Windows system?

Jérémy C.
NI France

0 Kudos
Message 11 of 18
(1,156 Views)

i used to think that in order to call a DLL you must use a static library (.lib) on your project. That's what i'm trying, i m not looking for a static linking. Do you mean i 'm doing wrong (ie including a .lib file to call a .dll file)?

 

I will look at your links and tell you

i have installed visual c++ express 2010, i will also try with it.

i have previuolsy used DEVCPP to make a GUI associated with GTK+ and it worked fine. And i have never studied MVC That's why i choosed this one.

 

Many thanks 

0 Kudos
Message 12 of 18
(1,153 Views)

In my past projects, I always called .dll files to use functions written in it. That is the way used by MVC. I think there is a significant difference between using GCC under Windows and under Linux. Maybe under Linux, calling .lib could work.

 

Once you have learned to use MVC, I think you will prefer using it. Good luck.

Jérémy C.
NI France

0 Kudos
Message 13 of 18
(1,144 Views)

Good Morning Jeremy

i 've tried this morning with MVC and it compiled fine

Indeed it seems easier with this compiler. Very interesting the links you gave me yesterday, i have learned a lot about DLL.

Now next step is to find right functions that match my needs and to test with the PCI card.

 

Thank you very much and read you soon for my next problem 😉

 

0 Kudos
Message 14 of 18
(1,138 Views)

I'm glad to hear that. I hope that everything will be fine.

 

Have a nice day.

Jérémy C.
NI France

0 Kudos
Message 15 of 18
(1,136 Views)

Thank you JEremy

i just have a little problem. In my project made with DEVCPP, i use a gpib link with a gpib-usb-HS from National Instrument and it works fine. Now i am migrating my application code on MVC i have a problem with the linker

Erreur 1 error LNK1104: impossible d'ouvrir le fichier 'gpib-32.obj' C:\Documents and Settings\xxx\projet_gtk\projet7\projet\projet\LINK

 

But i have put gpib-32.obj in the project properties dependencies: (in french proprietes du projet\dependances supplementaires) 

Do you know what is missing or happens?

 

Many thanks to you

 

have a nice day

0 Kudos
Message 16 of 18
(1,133 Views)

Usually, you have to open a new post to ask a new question. Moreover it's not really a problem relative to NI products. But I will try to answer to your question for the last time:

 

Here some links of forums where people met the same problem as yours and there are some solutions proposed:

Link 1

Link 2

Link 3

Link 4

Link 5

 

But I think that the problem comes from the spaces in the path of your file. This link will give you more information : Spaces in the path

 

Even I think that the last link will be the solution to your problem, I suggest you to glance at the 5 other links.

 

Try google for this kind of problem.

 

Regards

Jérémy C.
NI France

0 Kudos
Message 17 of 18
(1,130 Views)

in fact i didn't put the path of the gpib-32.obj file in the library directory.

thank you very much and have a good week end

 

Raphael,

0 Kudos
Message 18 of 18
(1,128 Views)