I'm implementing a CORBA wrapper in C++ with Visual C++ 2008 and Borland VisiBroker 8. As you can see below, the compilation process was successfully executed, but linking failed. If there's anybody out there who can give me a tip, i'd certainly appreciate it.
Thanks for your quick response! I'm not sure i do understand what u mean by linking to the .lib. I'm honestly not an experienced C++ and VC++ 2008 programmer. I'm new to these technologies. But after googling for a while and trying hard to understand the error message i think the Linker is unable to access certain libraries. Which Libraries??? I don't know.
My understanding is that the Linker configuration at Configuration Properties -> Linker -> Input -> Additional Dependencies needs to be modified.
Okay, I've never used whatever library it is you're using (I don't even know what CORBA is, actually), but the ordinary method for linking to a library with VC++ is this:
You should have gotten with the library at least the first two of these three:
1. One or more headers that tell the compiler what the functions look like. You obviously have this, or you'd be getting compiler errors.
2. One or more .libs that defines some or all of the functions, and tells the linker to shut up about the ones that aren't defines.
3. One or more DLLs that will be linked to the program at run time if some of the functions weren't fully defined by the .libs.
Now, assuming you have number 2, you should put it somewhere where the compiler can find them. I would set aside a directory in My Documents to put all .libs and then add it to the compiler list in tools>options>projects and solutions>VC++ directories>show directories for: library files. If you're feeling lazy, you can just leave them in one of the directories that are already listed there (e.g. "$(VSInstallDir)lib").
Next, you need to add their file names (not their full path. It will still work if you add the full path, but it's unnecessary thanks to the previous step) to that option you mentioned (Configuration Properties -> Linker -> Input -> Additional Dependencies). Don't forget the file name extensions.
I tried your suggestion and the total number of link errors dropped from 124 to 17. Just like you rightly predicted in point 3, i'm a fraid some of the function aren't fully implemented. I tried all the libs in the lib folder and still wasn't able to get rid of the 17 remaining link errors.
Let me briefly describe what my program is suppose to do. It might give u a big picture of what i'm tryin to do.
My task is to let a Java client communicate with a C++ server. To realize this, CORBA specifies a programming methodology of how one can hoke a Java client to communicate with a C++ server and vice-versa. Borland VisiBroker here is actually a piece of software that implements the CORBA specification and provides libs, header files and compilers for this purpose. With the aid of the CORBA Interface Definition Language (CORBA IDL), i was able to create a file that describe the interfaces my C++ server exposes. Using the compilers in VisiBroker i generated Java and C++ proxy files from the IDL file. The generated Java and C++ files now have to be integrated in my Java client and C++ server respectively.
I did that and integrated some header files, from my VisiBroker include folder (C:\Borland\VisiBroker\include), into my program. The compilation was successful and linking failed. From the suggestion u gave me, i integrated some lib files, C:\Borland\VisiBroker\lib, into the VC++ 2008 Linker configuration. Because of this i was able to reduce the total number of link errors from 124 to 17.
I noticed something when i was tryin to lookup the right libs for the VC++2008 linker. The include folder in VisiBroker has many more useful header files than i was able to find lib folder. Is there a way of generating more libs from the header files ? My question is in reference to ur point 3. U said if the functions aren't fully implemented then the only option is to do it myself.