Author Topic: mingw linked files removal  (Read 7595 times)

Offline pixelpuffin

  • Multiple posting newcomer
  • *
  • Posts: 11
mingw linked files removal
« on: November 17, 2013, 09:01:27 pm »
i tried to compile the sample code here http://www.directxtutorial.com/Lesson.aspx?lessonid=9-4-4
near the bottom of the page main.cpp
i get back one error "fatal error: d3dx9.h: No such file directory"
after searching for about five minutes i found that the linker has an extra thing that is causing it to look in the wrong place and that i just need to go into linker settings and remove it
so i tried that to find that there is nothing in my linker settings

thus my question is how can i remove the extra link without going into settings -> compiler -> linker settings

side note
i also tried project -> build options -> filename -> build/debug -> linker settings

build log
Code
mingw32-g++.exe -Wall -fexceptions  -g     -c C:\Users\Username\Desktop\useless\testingstuffs\main.cpp -o obj\Debug\main.o
C:\Users\Username\Desktop\useless\testingstuffs\main.cpp:4:19: fatal error: d3dx9.h: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings (0 minutes, 0 seconds)
« Last Edit: November 17, 2013, 10:21:33 pm by pixelpuffin »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: mingw linked files removal
« Reply #1 on: November 17, 2013, 09:50:37 pm »
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

Post a full re-build log or I will ignore you!
Please use code tags for the build log.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline pixelpuffin

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: mingw linked files removal
« Reply #2 on: November 17, 2013, 11:44:38 pm »
is there a file somewhere that has the linker information in a format that i could modify?

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: mingw linked files removal
« Reply #3 on: November 18, 2013, 12:01:00 am »
You can modify the compiler/linker settings in Project->build options.

In your case you have to add the path to the d3...h file to the compiler search directories

greetings

Offline pixelpuffin

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: mingw linked files removal
« Reply #4 on: November 18, 2013, 12:12:42 am »
i already stated that i need to remove a file from the linker which i tried but it shows no files to be removed when i go under project -> build options -> linker settings or settings -> compiler -> linker settings

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: mingw linked files removal
« Reply #5 on: November 18, 2013, 11:52:10 am »
i already stated that i need to remove a file from the linker which i tried but it shows no files to be removed when i go under project -> build options -> linker settings or settings -> compiler -> linker settings
You have to be a bit more specific... You want compile a file, but not link it? If you want to exclude a file from the build process you can do this on several ways:
1) Right click on the file in the Project Tab -> Build -> Compile File /link file
2) Project -> Properties -> Build Targets -> Build Target Files

greetings

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: mingw linked files removal
« Reply #6 on: November 18, 2013, 12:02:00 pm »
And still the build log is missing !!

Offline pixelpuffin

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: mingw linked files removal
« Reply #7 on: November 18, 2013, 07:53:33 pm »
the file d3dx9.h is not supposed to be linked but it is which is directing it to the wrong place
i looked in linker settings and there were no files and i looked in build targets and the only target file is main.cpp
i posted all that was in the build log in the first post in code tags
when i compile i get an error reading "fatal error: d3dx9.h: No such file directory"
thats all there is to it

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: mingw linked files removal
« Reply #8 on: November 18, 2013, 08:02:59 pm »
the file d3dx9.h is not supposed to be linked but it is which is directing it to the wrong place
i looked in linker settings and there were no files and i looked in build targets and the only target file is main.cpp
i posted all that was in the build log in the first post in code tags
when i compile i get an error reading "fatal error: d3dx9.h: No such file directory"
thats all there is to it

You do NOT know the difference between linking and compiling.
Please post the full re-build log; or I will think you are an not worth helping.

This means do a rebuild and post the full log. Note: If that is the full log then it is NOT both compiling and linking.

FYI: Your error is a Compiler error; please go somewhere and learn how to program.

If you are going to ignore all the advice please leave this website and never return!

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline pixelpuffin

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: mingw linked files removal
« Reply #9 on: November 18, 2013, 08:28:39 pm »
im not ignoring the advice i tried all recommend options more than twice each
im a bit new to programming but i am absolutely certain that the problem is resolved when d3dx9.h is removed from linker settings because hundreds of other people have had this problem too where the directx sdk wizard links files for them incorrectly
that is the entire build log and i assume the reason it does link and compile is because it found an error although that isnt of improtance to me
what i need to know is how to change the linker settings from outside the application because ive tried changing them from in the apllication and that doesnt work
and i need to know in the next hour and a half if possible

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: mingw linked files removal
« Reply #10 on: November 18, 2013, 09:18:02 pm »
You are wasting everyone's time its a compiler error!!!!!

Remove the include of the header or add the include path to the header.

Follow the "For your project" section if you wish to fix the real problem; if you DO NOT wish to fix the problem go away!

http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28general%29#Q:_I_would_like_to_compile_a_project_using_some_non-standard_libraries._How_can_I_indicate_to_CodeBlocks_that_these_libraries_and_include_files_exist.3F

Edit: Next time ask your programming questions on a programming site. This site is for Code::Blocks questions; You never really asked an real question of any type; I define you question to not be real when you ask questions like :I want to paint my house without using paint."
http://cboard.cprogramming.com/game-programming/105542-need-help-compiling-example-code-mingw-directx9.html

Tim S.
« Last Edit: November 19, 2013, 12:36:05 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline pixelpuffin

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: mingw linked files removal
« Reply #11 on: November 18, 2013, 09:31:08 pm »
im going to try something stupid be back in a few hours with the results