Menu

Project file parameters problem

Chett
2009-12-15
2012-09-26
  • Chett

    Chett - 2009-12-15

    using devcpp ver. V 4.9.9.2
    windows XP

    I have been developing some stuff with irrlicht
    ver 1.6 of Irrlicht has dev cpp project files in the examples, those work fine
    for me. I wound up using one and simply replacing the actual code files,
    things were going fine up until I needed to create an executable I could send
    to another system. When I open a project it does complain about not being able
    to create an output (already set in project file as ../../bin/Win32-gcc) but I
    ignore it and it does it anyway.
    Any change in the project file output directory or movement of the create
    executable and it fails.
    If I use run from inside devcpp I just get the console window flash, just run
    the program and I get
    a windows error = procedure entry point _ZN3irr5video16IdentityMaterialE could
    not be located in dynamic link library Irrlicht.dll (yes I did try moving a
    copy or the dll to wherever I moved the file too)
    following copy of compile log where it works fine (example from irrlicht)

    Compiler: Default compiler
    Building Makefile:
    "E:\ALLNEW\irr6\irrlicht-1.6\irrlicht-1.6\examples\01.HelloWorld\Makefile.win"
    Executing make clean
    rm -f main.o ../../../../../../EpothyN/01.HelloWorld.exe

    g++.exe -c main.cpp -o main.o -I"d:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"
    -I"d:/Dev-Cpp/include/c++/3.4.2/backward" -I"d:/Dev-
    Cpp/include/c++/3.4.2/mingw32" -I"d:/Dev-Cpp/include/c++/3.4.2" -I"d:/Dev-
    Cpp/include" -I"../../include"

    g++.exe main.o -o "............\EpothyN\01.HelloWorld.exe" -L"d:/Dev-
    Cpp/lib" ../../lib/Win32-gcc/libIrrlicht.a

    Execution terminated
    Compilation successful

    and here with change to output directory with my code

    Compiler: Default compiler
    Building Makefile:
    "E:\ALLNEW\irr6\irrlicht-1.6\irrlicht-1.6\examples\Epothy1\Makefile.win"
    Executing make clean
    rm -f obj/main.o obj/RealisticWater.o Epothy.exe

    g++.exe -c main.cpp -o obj/main.o -I"d:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"
    -I"d:/Dev-Cpp/include/c++/3.4.2/backward" -I"d:/Dev-
    Cpp/include/c++/3.4.2/mingw32" -I"d:/Dev-Cpp/include/c++/3.4.2" -I"d:/Dev-
    Cpp/include" -I"../../include"

    main.cpp: In function int main()': main.cpp:64: warning: passingfloat' for converting 1 of
    irr::video::SColor::SColor(irr::u32, irr::u32, irr::u32, irr::u32)' main.cpp:64: warning: passingfloat' for converting 2 of
    irr::video::SColor::SColor(irr::u32, irr::u32, irr::u32, irr::u32)' main.cpp:64: warning: passingfloat' for converting 3 of
    irr::video::SColor::SColor(irr::u32, irr::u32, irr::u32, irr::u32)' main.cpp:64: warning: passingfloat' for converting 4 of
    `irr::video::SColor::SColor(irr::u32, irr::u32, irr::u32, irr::u32)'

    g++.exe -c RealisticWater.cpp -o obj/RealisticWater.o -I"d:/Dev-
    Cpp/lib/gcc/mingw32/3.4.2/include" -I"d:/Dev-Cpp/include/c++/3.4.2/backward"
    -I"d:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"d:/Dev-Cpp/include/c++/3.4.2" -I"d
    :/Dev-Cpp/include" -I"../../include"

    g++.exe obj/main.o obj/RealisticWater.o -o "Epothy.exe" -L"d:/Dev-Cpp/lib"
    ../../lib/Win32-gcc/libIrrlicht.a

    Execution terminated
    Compilation successful

    So sorry for long winded explaination but what I need is how to fix this so I
    can put the executable created in any other directory so I can move it to
    other systems.

     
  • cpns

    cpns - 2009-12-15

    things were going fine up until I needed to create an executable I could
    send to another system

    Than makes no sense; what were you building prior to that? If it ran at all,
    you already had an executable.

    Credit for posting teh log, but you should post logs in code mark-up to
    preserve sense and format! Use the wysiwyg preview pane to check your post
    before posting. It should have looked like this:

    Compiler: Default compiler
    Building Makefile:
    "E:\ALLNEW\irr6\irrlicht-1.6\irrlicht-1.6\examples\01.HelloWorld\Makefile.win"
    Executing make clean
    rm -f main.o ../../../../../../EpothyN/01.HelloWorld.exe

    g++.exe -c main.cpp -o main.o -I"d:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"
    -I"d:/Dev-Cpp/include/c++/3.4.2/backward" -I"d:/Dev-Cpp/include/c++/3.4.2/mingw32"
    -I"d:/Dev-Cpp/include/c++/3.4.2" -I"d:/Dev-Cpp/include" -I"../../include"

    g++.exe main.o -o "............\EpothyN\01.HelloWorld.exe" -L"d:/Dev-
    Cpp/lib"
    ../../lib/Win32-gcc/libIrrlicht.a

    Execution terminated
    Compilation successful

    and

    Compiler: Default compiler
    Building Makefile:
    "E:\ALLNEW\irr6\irrlicht-1.6\irrlicht-1.6\examples\Epothy1\Makefile.win"
    Executing make clean
    rm -f obj/main.o obj/RealisticWater.o Epothy.exe

    g++.exe -c main.cpp -o obj/main.o -I"d:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"
    -I"d:/Dev-Cpp/include/c++/3.4.2/backward" -I"d:/Dev-Cpp/include/c++/3.4.2/mingw32"
    -I"d:/Dev-Cpp/include/c++/3.4.2" -I"d:/Dev-Cpp/include" -I"../../include"

    main.cpp: In function int main()': main.cpp:64: warning: passingfloat' for converting 1 of
    irr::video::SColor::SColor(irr::u32, irr::u32, irr::u32, irr::u32)' main.cpp:64: warning: passingfloat' for converting 2 of
    irr::video::SColor::SColor(irr::u32, irr::u32, irr::u32, irr::u32)' main.cpp:64: warning: passingfloat' for converting 3 of
    irr::video::SColor::SColor(irr::u32, irr::u32, irr::u32, irr::u32)' main.cpp:64: warning: passingfloat' for converting 4 of
    `irr::video::SColor::SColor(irr::u32, irr::u32, irr::u32, irr::u32)'

    g++.exe -c RealisticWater.cpp -o obj/RealisticWater.o
    -I"d:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"
    -I"d:/Dev-Cpp/include/c++/3.4.2/backward" -I"d:/Dev-Cpp/include/c++/3.4.2/mingw32"
    -I"d:/Dev-Cpp/include/c++/3.4.2" -I"d:/Dev-Cpp/include" -I"../../include"

    g++.exe obj/main.o obj/RealisticWater.o -o "Epothy.exe" -L"d:/Dev-Cpp/lib"
    ../../lib/Win32-gcc/libIrrlicht.a

    Execution terminated
    Compilation successful

    I need is how to fix this so I can put
    the executable created in any other
    directory so I can move it to other
    systems.

    You are very confused; the location of your project source code has no bearing
    on the location of the executable. C++ is not an interpreted scripting
    language; when you deploy an application, all you need to distribute is the
    executable, and any DLL's that may have been used. You do not distribute the
    source code. If you actually mean that you want to move the project build to
    another system, then that is a different matter.

    However you do have a problem in that you have modified your project code and
    broken the build. The warnings do not suggest this is because you have moved
    the code, but rather that you are passing float arguments to functions
    expecting irr::u32 type arguments. You really should read the diagnostic
    messages - they tell you stuff!

    One other thing I notice is that in moving the project code you have not moved
    the project file; you are still building the project in
    "E:\ALLNEW\irr6\irrlicht-1.6\irrlicht-1.6\examples\01.HelloWorld\" which I
    suggest is inappropriate. I'd also be very cautious of all those relative file
    paths; it suggests that perhaps you have source, headers, and project files
    scattered all over your hard drive, which itself will make it difficult if you
    want to move the build to another machine.

    Clifford.

     
  • Chett

    Chett - 2009-12-15

    Sorry about the format, I find this forum a little confusing.

    Anyway, I agree that it makes no sense.
    The few warnings in that compile are not relevant.
    THe simple fact is I can compile it with unmodified project file and it runs
    just fine - either from inside devcpp with run command or directly in the
    ../../bin file where it gets saved
    If I change the save location in the project options or move the executable
    file created it does not.
    The path is long and messy looking but in fact all the files are in the same
    directory - I probably confused the issue by showing the compile log from one
    of the examples first(my bad).
    The program calls a lot of graphics files when it runs, my intent here was to
    move everything to a different dir so I could make sure I had all the files,
    and only those files in it so I could move them.
    Just to be sure I was not crazy I just repeated the action:
    1. compiled and ran from inside devcpp and it worked fine
    2. ran directly from the place the executables gets written (../../bin/Win32-gcc) worked fine
    3. moved to another dir, error where is apparently can't find dll entry point.
    4. changed the save location in the build options and recompiled - failed the same way as moving it.

     
  • cpns

    cpns - 2009-12-15

    Sorry about the format, I find this
    forum a little confusing.

    Select the text, click the format button. What's confusing? Also read ; it is
    not about SourceForge, but a site that uses the same mark-up syntax and
    preview.

    I change the save location in the
    project options or move the executable
    file created it does not.

    So in that circumstance what does happen? Do you get any error message. If you
    directly execute the .exe file if must get loaded and executed, even if it
    immediately terminates or crashes. Run it from within a cmd console to make
    sure that you see any run-time error messages emitted. If you are linking to a
    DLL, the DLL must be available at run-time. That is it must exist either in
    the same folder as the .exe, or in a location specified in the PATH
    environment variable. That IMO is almost certainly your problem.

    The path is long and messy looking but
    in fact all the files are in the same
    directory

    I beg to differ, you have an include path "....\include"; where does that
    map to, if anywhere? And the makefile.win (generated from the .dev file)
    remains in the examples folder. I am only interpreting what the build log is
    telling me, which is irrefutable.

    I probably confused the issue by showing the compile log from one of
    the examples first

    No, I think you confused by not fixing the warnings or mentioning that they
    were not part of your problem, and then claiming that the output file was not
    created, when that is not indicated at all in the build log.

    There appears to be nothing special about this build other than linking
    libIrrlicht.a; no non-default options are set, but you have messed it up a bit
    by relying on files in teh examples folder. I suggest that you create a new
    empty project, and add your source to it. Then either link libIrrlicht.a
    directly (via the "add object or library" button in the project options
    dialog), or by adding the path to libIrrlicht.a to the libraries path, and
    then -lIrrlicht to the linker options. Note that is -<lowercase-L>Irrlict.

    Clifford

    : http://www.codinghorror.com/blog/archives/001306.html

     
  • Chett

    Chett - 2009-12-15

    Well I apparently don't manage to make myself very clear. I don't think I ssid
    anything about it not creating a file, if I did it was wrong there has never
    been a problem with creating the files. And I did give the windows error
    message in the first question here.

    "I get a windows error = procedure entry point
    _ZN3irr5video16IdentityMaterialE could not be located in dynamic link library
    Irrlicht.dll"

    perhaps it got lost in my clumsy formatting. I also noted that the dll was in
    the same dir when I tried to run the executable.

    I am rather convinced its a compiler switch somewhere, I just can't figure out
    where/what to set.I have in the space between messages here tried the make a
    new project file from scratch and I am right back to the same place.

     
  • Chett

    Chett - 2009-12-16

    Additional info I got from irrlicht forum says the error indicates it is
    loading the wrong dll,
    fixed now thanks for your help

     
  • cpns

    cpns - 2009-12-16

    I don't think I ssid anything about
    it not creating a file

    You said in the OP:

    When I open a project it does complain
    about not being able to create an
    output

    No doubt a misunderstanding.

    And I did give the windows error
    message in the first question here.

    You did; I apologise, I missed that. Unfortunately it was the most important
    piece of information yet was lost amongst a lot of irrelevant information and
    bad formatting.

    I am rather convinced its a compiler switch somewhere

    The run-time error is generated by the OS loader when it attempts to link the
    DLL. So you have no reason to suspect a "compiler switch"; especially when
    both example builds use the same settings. The reason one worked and the other
    did not was either because one was running with the correct DLL, or because
    the one that worked had no dependency on that particular symbol.

    I got from irrlicht forum says the error indicates it is loading the wrong
    dll,

    Exactly what I logged on to tell you! Sorry that I missed the critical piece
    of information there; we might have solved it much earlier. I understand that
    if you don't know what is important, too much information is often better; but
    it does have to be presented carefully when you do that. The best thing to
    have done in this case would have been to present the facts and avoid the
    comment, speculation, and things you knew to be irrelevant, such as issues
    with output files and compiler warnings.

    Other suggestions regarding organising your project and starting with a blank
    clean project etc. still stand as valid however.

    Good luck.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.