Menu

#32 Compiling error on Windows 7 64 bits and MinGW

v1.0_(example)
open
nobody
1
2023-03-08
2012-11-12
Anonymous
No

Hello. I don't have any problem to use CUnit on Linux but on Windows it's a real challenge... I've installed MinGW correctly, check the PATH environement variable (C:\MinGW\bin;) and I use Windows PowerShell to go to the CUnit directory. I can perform the command sh .\configure and all the step is correctly executed. After that, I try the make command but it fails with the error :

PS C:\Users\cyrill.gremaud\Downloads\CUnit-2.1-2> make

/c/Users/cyrill.gremaud/Downloads/CUnit-2.1-2/"C:/MinGW/msys/1.0/bin/make.exe" all-recursive
/bin/sh: /c/Users/cyrill.gremaud/Downloads/CUnit-2.1-2/C:/MinGW/msys/1.0/bin/make.exe: No such file or directory
make.exe": *** [all] Error 127

I've look into the FAQ, the forum, my best friend Google but I don't find the solution. Thanks for your help.

Discussion

  • Martin Pischky

    Martin Pischky - 2016-01-17

    Have also problems with this. Tried with configure and make as decribed in README:

    $ tar xjf CUnit-2.1-3.tar.bz2
    $ cd CUnit-2.1-3
    $ aclocal
    $ autoconf
    $ automake --add-missing
    $ automake
    configure.in:161: required file `./ltmain.sh` not found
    CUnit/Sources/Framework/Makefile.am:20: `%`-style pattern [...] nsion
    configure.in:211: required file `config.h.in` not found
    $ autoheader
    $ automake
    configure.in:161: required file `./ltmain.sh` not found
    CUnit/Sources/Framework/Makefile.am:20: `%`-style pattern [...] nsion
    $ ./configure 
    [...]
    config.status: executing libtool commands
    sed: can´t read ./ltmain.sh: No such file or directory
    sed: can´t read libtoolT: No such file or directory
    

    Looks like building with configure and make is not supported. Will have to try ftjam.

    If anybody has thsi running on mingw, please let me know what's wrong...

    Martin

     

    Last edit: Martin Pischky 2016-01-17
  • Martin Pischky

    Martin Pischky - 2016-01-19

    Hallo,
    got it running this way:

    $ tar xjf CUnit-2.1-3.tar.bz2
    
    $ cd CUnit-2.1-3
    
    $ ./bootstrap /usr/local
    libtoolize: putting auxiliary files in `.`
    [...]
    config.status: executing libtool commands
    
    $ make
    make  all-recursive
    [...]
    c:\mingw\include\io.h:301:1: error: unknown type name 'off64_t'
     __CRT_INLINE off64_t lseek64 (int, off64_t, int);
     ^
    [...]
    c:\mingw\bin\strip.exe: './AutomatedTest.exe': No such file
    ../../libtool: line 9535: ./AutomatedTest.exe: No such file or directory
    [...]
    
    $ make install
    Making install in CUnit
    [...]
    
    $ ls /usr/local/include/CUnit/
    Automated.h  CUError.h  CUnit_intl.h  MyMem.h   TestRun.h
    Basic.h      CUnit.h    Console.h     TestDB.h  Util.h
    
    $ ls /usr/local/lib/
    libcunit.a  libcunit.la  pkgconfig
    

    Now I can compile exe files with static linked cunit lib. The installation is done in /usr/local wich maps to C:\MinGW\msys\1.0\local on my system. Documentation ist in C:\MinGW\msys\1.0\local\doc\CUnit\index.html

    Looks like /usr/local/include and /usr/local/lib are not default search paths for mingw, so add:

    CUNIT=/usr/local
    ... gcc "-I$(CUNIT)/include" ...
    ... gcc "-L$(CUNIT)/lib" ...
    

    to your makefile.

    HTH
    Martin

     

    Last edit: Martin Pischky 2016-01-19
  • Anonymous

    Anonymous - 2023-03-08
    Post awaiting moderation.

Anonymous
Anonymous

Add attachments
Cancel





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.