[Dev-C++] errors when linking to a .lib
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Stewart, J. <JSt...@ra...> - 2004-04-15 06:26:59
|
I am trying to link a C program with a .lib library file that was = provided to me by a third party. All I have is a .lib, header files and an example program with MSVC = project files. I want to try and use DevC++ to link the sample provided = but I am having some trouble. When trying to use DevC++ to link I get the following errors. lib/Sigmalib.lib(./Debug/Sigmalib.obj)(.text+0xb1): In function = `c_initfiles': c:\sig16dev\misc\c:20: undefined reference to `_chkesp' fu000005.o(.idata$3+0xc): undefined reference to `libmsvcrt_a_iname' nmth000000.o(.idata$4+0x0): undefined reference to `_nm___iob' I think this is because the lib was built in MS Visual C++ and there are = functions in the library (eg initfiles) that are making references to = weird MS things. The people that provide the lib also provided me with a = MSVC workspace/project, which I am able to use my friends copy of MSVC = to compile and link without hassel. I tried to import the MSVC dsp file using the DevC++ import feature, but = that also failed to build, with the same errors. i read somewhere in the archives that i might need to use reimp to = convert the .lib to an .a file? would this help? how would I do this? Could I then put in my own dummy = copy of _chkesp and ar myself a new library? If anyone has seen this thing before when trying to port other MSVC = libraries or trying to use third party libs maybe you can help. Or = perhaps I am missing a simple linker switch (I am new to DevC++). Any = assistance is greatly appreciated. Attached is a copy of the link output. Josh Stewart. |