Conflicting Dependancies

I’m looking to write an extremely simple C++ application to interface with FrontPanel. I’m using Visual Studio .NET 7.1. I’m trying to avoid any complications by making this simply a console application.

I created a project using Visual Studio .NET’s “Win32 Console Application” template. I then added the FrontPanel API directory to the .h file and .lib file search paths, and added okxem.lib to the linker’s list of dependancies.

When I tried compiliing a program which simply instantiated the okCUsbXEM object, I began running into some conflicting dependancies. When I instructed Visual Studio .NET to no longer link libcd.lib, the program compiled successfully.

However, it appears that I may need to use libcd after all – it seems like the printf function is defined there, and I haven’t been able to make iostream’s cout work (*)… It’s been a while since I’ve done much programming, and it seems Microsoft has done all they can to make the simplest tasks more complicated.

Any suggestions?

(*) If I place an "#include " statement in my main cpp file, and type “cout.”, one of those handy intellisense drop down menus appears listing cout methods, which seems to indicate that the cout object is in scope. However, when I compile such a program with any use of cout, I get an “unrecognized identifier” error from the compiler.

First, to answer the (*) issue, try using std::cout. cout ends up in the std namespace which won’t be brought up by default. One alternative is to put “using namespace std;” at the top (or around) the part of your code that uses cout.

For the other conflicts, can you include a few lines of the compiler or linker output?

Have you tried looking at the online tutorial (posted a few weeks ago). It includes a console application built with MSVC 7.1. It’s setup probably corresponds closest with yours.

Cheers,
Jake

Thanks!

I’ll take a detailed look at your suggestions later tonight. After I made my post, it occured to me that the best thing for me to do would be to look at some sample programs, so thanks for directing me to one.

Aviv