User forums > Help

fatal error LNK1104: cannot open file 'game.def'

<< < (4/7) > >>

THE_SUFFERER:

--- Quote from: sodev on January 12, 2020, 09:25:24 pm ---
--- Quote from: THE_SUFFERER on January 12, 2020, 07:23:23 pm ---Moreover, I was doing everything due to the instruction - https://kingpin.info/?p=compiling-with-codeblocks

--- End quote ---

No you didn't. The author of that "guide" doesn't seem to know what he is really doing and therefor offers some random try-and-error advices how to fix things because he did them wrong in the first place.

One of these advices is to try different path specifications to that def file. That seems to be the problem in your case, that file is not in the working directory of the compiler which should be the directory of the CodeBlocks project file. Determine the relative path to the def file starting at the directory of the project file and add that to the compiler settings, then it will be found.

--- End quote ---

THE_SUFFERER:

--- Quote from: stahta01 on January 12, 2020, 11:07:02 pm ---Please paste a full text build log if you still want help.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

Tim S.

--- End quote ---

I am running Code::Blocks version 17.2 on Windows 7 Service Pack1. The compiler I use is Microsoft Visual C++ ToolKit 2003

When I try to create a.dll file following this instruction - https://kingpin.info/?p=compiling-with-codeblocks I have a lot of problems like "Cannot open .h file"\"Cannot open .lib file" and so on. That can be fixed by adding the "include" and "lib" paths of Codeblocks, Toolkit 2003, Platform SDK to the "Linkers", "Searcing Directories" and others.

Nevertheless on the th erros doesn't have any cure. At least I haven't found it. The UBER error is "cannot open .def file". .def isn't .lib, .h etc. So, I don't know how exactly I have to mention it in the settings so that it's found. I tried to add its parth everywhere I could but no happiness was received by me :'(

Build log:

--- Code: ---Paste full build log here. (It is found in the 'Build log' tab). Please make always a 'rebuild' (Menu: Build->Rebuild) or a 'clean' and 'build' before you copy the full build log.

--- End code ---

Crash report:

--- Code: ---
-------------- Build: Release in Gamex86 (compiler: Microsoft Visual C++ Toolkit 2003)---------------

link.exe /dll /nologo /LIBPATH:D:\KingpinDev\Code\CodeBlock\CodeBlocks\Projects\Gamex86\Source\game.def /LIBPATH:D:\KingpinDev\Code\CodeBlock\CodeBlocks\Projects\Gamex86\Source\GAME.def /LIBPATH:D:\KingpinDev\Code\CodeBlock\CodeBlocks\MinGW\lib /LIBPATH:"D:\KingpinDev\Code\Platform SDK\Lib" /LIBPATH:D:\KingpinDev\Code\CodeBlock\CodeBlocks\ToolKit\lib /LIBPATH:D:\KingpinDev\Code\CodeBlock\CodeBlocks\Projects\Gamex86\Source\GAME.def /out:bin\Release\Gamex86.dll Source\NavLib\NavLib.lib user32.lib obj\Release\Source\AI_BITCH.obj obj\Release\Source\ai_bum_sit.obj obj\Release\Source\AI_DOG.obj obj\Release\Source\AI_PUNK.obj obj\Release\Source\AI_RUNT.obj obj\Release\Source\ai_shorty.obj obj\Release\Source\ai_skinny.obj obj\Release\Source\AI_THUG.obj obj\Release\Source\ai_thug_sit.obj obj\Release\Source\AI_WHORE.obj obj\Release\Source\EP_ALL.obj obj\Release\Source\ep_crystalpalace.obj obj\Release\Source\EP_LOG.obj obj\Release\Source\ep_posionville.obj obj\Release\Source\ep_radiocity.obj obj\Release\Source\ep_shipyards.obj obj\Release\Source\ep_skidrow.obj obj\Release\Source\ep_steeltown.obj obj\Release\Source\ep_trainyard.obj obj\Release\Source\G_AI.obj obj\Release\Source\g_ai_ents.obj obj\Release\Source\g_ai_fight.obj obj\Release\Source\g_ai_memory.obj obj\Release\Source\G_CAST.obj obj\Release\Source\G_CHASE.obj obj\Release\Source\G_cmds.obj obj\Release\Source\G_combat.obj obj\Release\Source\G_FOG.obj obj\Release\Source\G_FUNC.obj obj\Release\Source\G_items.obj obj\Release\Source\g_joe_misc.obj obj\Release\Source\G_main.obj obj\Release\Source\G_MISC.obj obj\Release\Source\G_PAWN.obj obj\Release\Source\G_PHYS.obj obj\Release\Source\G_save.obj obj\Release\Source\G_spawn.obj obj\Release\Source\G_SVCMDS.obj obj\Release\Source\G_TARGET.obj obj\Release\Source\g_teamplay.obj obj\Release\Source\g_trigger.obj obj\Release\Source\G_UTILS.obj obj\Release\Source\G_WEAPON.obj obj\Release\Source\M_BBOX.obj obj\Release\Source\M_MOVE.obj obj\Release\Source\P_client.obj obj\Release\Source\P_HUD.obj obj\Release\Source\P_TRAIL.obj obj\Release\Source\P_VIEW.obj obj\Release\Source\P_WEAPON.obj obj\Release\Source\Q_SHARED.obj obj\Release\Source\VEHICLES.obj obj\Release\Source\VOICE.obj obj\Release\Source\voice_bitch.obj obj\Release\Source\voice_punk.obj  D:\KingpinDev\Code\CodeBlock\CodeBlocks\Projects\Gamex86\Gamex86\Source\GAME.def D:\KingpinDev\Code\CodeBlock\CodeBlocks\Projects\Gamex86\Gamex86\Source\GAME.def D:\KingpinDev\Code\CodeBlock\CodeBlocks\Projects\Gamex86\Source\GAME.def
LINK : fatal error LNK1181: cannot open input file 'D:\KingpinDev\Code\CodeBlock\CodeBlocks\Projects\Gamex86\Gamex86\Source\GAME.def'
Process terminated with status 1181 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))

--- End code ---

I have already tried to add this file to all other paths I mentioned in the settings, reinstall CodeBlocks, follow that guide again thinking maybe I did some mistake in the middle or something but nothing works. Life is sad :'(

sodev:
Everywhere except the only location that matters: The file is specified as direct linker option, all these search directories settings are pointless.

Go to Linker Settings -> Other linker options and fix the path in the option /def:game.def

Update: You get this new error because you actually broke that linker setting, it now looks like a regular input file for the linker which in fact it is not.

THE_SUFFERER:

--- Quote from: sodev on January 14, 2020, 05:13:55 pm ---Everywhere except the only location that matters: The file is specified as direct linker option, all these search directories settings are pointless.

Go to Linker Settings -> Other linker options and fix the path in the option /def:game.def

Update: You get this new error because you actually broke that linker setting, it now looks like a regular input file for the linker which in fact it is not.

--- End quote ---

Which "Linker Settings"? There are some in "Compiler" and some in "Build Options". Well, I changed them both.

THE_SUFFERER:

--- Quote from: sodev on January 14, 2020, 05:13:55 pm ---Everywhere except the only location that matters: The file is specified as direct linker option, all these search directories settings are pointless.

Go to Linker Settings -> Other linker options and fix the path in the option /def:game.def

Update: You get this new error because you actually broke that linker setting, it now looks like a regular input file for the linker which in fact it is not.

--- End quote ---

And the result is the same ;D

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version