Advertisement

Prolems with cdxLib Tutorial

Started by August 22, 2002 03:21 AM
7 comments, last by wombatvvv 22 years, 2 months ago
Hi, I can''t get the first cdxlib tutorial (http://www.cdxlib.com/files/tutorials/CDX_Tutorial.chm) to work. It''s supposed to just bring up a blank window, but I get the following errors when building: Linking... LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library cdx.lib(cdxscreen.obj) : error LNK2001: unresolved external symbol __imp__timeGetTime@0 LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/vics_experiment.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. I''ve included the following files in the project (just as the tutorial states): cdx.lib ddraw.lb dxguide.lib By the sound of the error, the cdx.lib library is causing some sort of conflict, but I don''t know how to set tha /NODEFAULTLIB thing like the error message says. One more thing: should I be using cdxlib at all? Should I try and learn how to do it without cdxlib? Any other libraries that are better? Any help appreciated.
Can''t anyone help me here!?
Advertisement
If you are using VC++ try going to Projecs..Settings and clicking on the Link tab.Then in the text box labeled Project options type /NODEFAULTLIB. I hope this helps but I dont know if it will.
No, that didn''t work. Thanks anyway.


Any other suggestions...anyone?
Wombatvvv:

Are you in DEBUG mode? Did you link cdxd.lib?

John.
I used CDX too and it worked just fine for me when I made a DirectDraw aplication. But when I tryed a Direct3D aplication it generated me some errors ( I do not remeber what errors ) ....
Did you downloaded all the docs and tutorials from the official site ? coz the realy tell you step by step what do you have to do to make an working application.

Ohhh and does somebody know whay doesn''t anybody work anymore at this library? Coz for 2 years now it''s seams that there is no activity there....


DariusKing
Advertisement
> LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main

This is the most important error, and the one you must fix first.

When you created the project, you created a console program instead of a Win32 one. Start a new project (make sure you chose Win32), and copy all your files over into it.


> LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library

This is not that important, but you can get rid of it by putting
/NODEFAULTLIB:libc in the text box on the link tab or project settings (as someone mentioned).

> cdx.lib(cdxscreen.obj) : error LNK2001: unresolved external symbol __imp__timeGetTime@0

Again on the link page, this time the text box that already has a load of .libs in it, add: winmm.lib


Hope that helps,

Alan
"There will come a time when you believe everything is finished. That will be the beginning." -Louis L'Amour
Thanks AlanKemp, that worked a treat.

But how am I, as a beginner, supposed to know to add that library file? Is there some way of telling that that "unresolved symbol" exists in that paticular library file, or did you just know from experience?

I can answer the winmm.lib part of the "how was I supposed to know" question very easily. RTFM. On the CDX website, in the FAQ section, one of the top items is what to do with a timGetTime error. With the libcd error is also in the FAQ. As far as the main function problem, I would recommend checking into Michael Rich''s website, AlphaX86 site in the download section (follow link). Download the Application Wizard for 3.0 (assuming your using CDX 3.x) and it will create an application wizard for Visual Studio.

I''m not trying to sound rude or anything, but did you read the CDX website? Did you sign up for the mailing list? Almost any of these question could also have been answered there (although we would have refered you to the FAQ for the winmm.lib...). I''ve been a maintainer for CDX for several years now and no one ever gets that one right... *sigh* But happy coding, and feel free to sign up for the mailing list at YahooGroups. We have three groups on there, CDX, CDX-Maint, and CDX-Games.

Always remember, you''''re unique. Just like everyone else.
Always remember, you''re unique. Just like everyone else.Greven

This topic is closed to new replies.

Advertisement