Thread: cygwin correct setup great full installation and proper usage features

  1. #1
    Registered User
    Join Date
    Nov 2015
    Posts
    119

    cygwin correct setup great full installation and proper usage features

    Respect deep joyfully express universal!
    Installed on the new cygwin disk; I try to compile ie actually test, I play

    Дмитро@Komp /cygdrive/f/HeloWorld
    $ g++ ublas_test.cpp -o ublas_test
    ublas_test.cpp:1:42: fatal error: boost/numeric/ublas/vector.hpp: No such file or directory
    #include <boost/numeric/ublas/vector.hpp>
    ^
    compilation terminated.



    I test cygwin, I try to compile. Why is my cygwin installed incorrectly?
    Please explain to me how to set it up correctly.


    I can't debug cygwin for days. Apparently the two compilers in my system result in an error anyway, but I haven't compiled a fairly simple example yet.

    Code:
    #include <boost/numeric/ublas/vector.hpp>
    #include <boost/numeric/ublas/matrix.hpp>
    #include <boost/numeric/ublas/io.hpp>
    
    using namespace boost::numeric::ublas;
    
    // "y = Ax" приклад
    int main()
    {
        vector<double> x(2);
        x(0) = 1; x(1) = 2;
    
        matrix<double> A(2,2);
        A(0,0) = 0; A(0,1) = 1;
        A(1,0) = 2; A(1,1) = 3;
    
        vector<double> y = prod(A, x);
    
        std::cout << y << std::endl;
    
        return 0;
    }

    But he can not find the files that exactly are there? What else is he? setup-x86 itself installed the files
    In some directories, I have not corrected anything there.


    Help me set up or install cygwin correctly!
    I either do not understand or I can not download it correctly.
    How do I fix the curve?
    Ask me clarifying questions. Point me to resources where the right information is different.
    Powerful request for help, about how you need a guide!


    F:\HeloWorld\ublas_test.cpp

    F:\Cygwin2\usr\include\boost\numeric\ublas\vector. hpp


    cd F:\HeloWorld

    Дмитро@Komp /cygdrive/f/HeloWorld
    $ g++ -IF:/Cygwin2/usr/include ublas_test.cpp -o ublas_test
    In file included from D:/MinGW/lib/gcc/mingw32/5.1.0/include/c++/mingw32/bits/gthr.h:148:0,
    from D:/MinGW/lib/gcc/mingw32/5.1.0/include/c++/ext/atomicity.h:35,
    from D:/MinGW/lib/gcc/mingw32/5.1.0/include/c++/bits/ios_base.h:39,
    from D:/MinGW/lib/gcc/mingw32/5.1.0/include/c++/ios:42,
    from D:/MinGW/lib/gcc/mingw32/5.1.0/include/c++/ostream:38,
    from D:/MinGW/lib/gcc/mingw32/5.1.0/include/c++/iterator:64,
    from F:/Cygwin2/usr/include/boost/operators.hpp:98,
    from F:/Cygwin2/usr/include/boost/serialization/strong_typedef.hpp:27,
    from F:/Cygwin2/usr/include/boost/serialization/collection_size_type.hpp:10,
    from F:/Cygwin2/usr/include/boost/serialization/array_wrapper.hpp:22,
    from F:/Cygwin2/usr/include/boost/serialization/array.hpp:26,
    from F:/Cygwin2/usr/include/boost/numeric/ublas/storage.hpp:21,
    from F:/Cygwin2/usr/include/boost/numeric/ublas/vector.hpp:21,
    from ublas_test.cpp:1:
    D:/MinGW/lib/gcc/mingw32/5.1.0/include/c++/mingw32/bits/gthr-default.h: In function 'int __gthread_yield()':
    D:/MinGW/lib/gcc/mingw32/5.1.0/include/c++/mingw32/bits/gthr-default.h:694:33: error: 'sched_yield' was not declared in this scope
    return __gthrw_(sched_yield) ();
    ^


    Thus, no compilation for a number of days has been successful! I just don't know how to set it up. What's more, I want to understand correctly how to actually use cygwin particularly well, in which situations especially well, different features.

  2. #2
    Registered User
    Join Date
    May 2019
    Posts
    214
    I have to wonder why cygwin? I suppose there are valid reasons, but at the moment I really have trouble justifying the complications.

    My thinking is that cygwin comes from a time when it made more sense, but at present it seems to me much more productive to use Linux or UNIX in a virtual machine, or to build on Windows with a Windows compiler and tools, like Visual Studio.

    I've noted you have several posts on the subject, but at this point aren't you starting to reconsider?

    Here I see that Mingw is mixed with Cygwin, but they actually have different purposes. Mingw is "native" while Cygwin is analogous to a operating system adapter, almost part way to a virtual machine.

    I may be missing something, and I'd like to know what that is.

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Remove the MinGW GCC from the path and see if it works then.

    Mixing an external MinGW GCC and cygwin should never be tried or expected to work!

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  4. #4
    Registered User
    Join Date
    Nov 2015
    Posts
    119
    Thank you!! I thank pleased.

    I have to wonder why cygwin? I suppose there are valid reasons, but at the moment I really have trouble justifying the complications.
    There is a lot of code that is used to compile it ./configure make, that written about this in README.
    There is a lot of such code, and a lot of good.

    Here I see that Means is mixed with Cygwin, but they actually have different purposes. Mingw is "native" while Cycling is analogous to a operating system adapter, almost part way to a virtual machine.
    Mixing an external MinGW GCC and cygwin should never be tried or expected to work!

    This is the trouble, surely this is the root of the problem.
    I didn't mean to do that! It is a problem, against my will, and it is not good and not due.

  5. #5
    Registered User
    Join Date
    Nov 2015
    Posts
    119
    Yes, I removed from the environment variable in Windows, now it turned out! Cheers happily well!! everything compiled perfectly!! Good wonderful good!!!

  6. #6
    Registered User
    Join Date
    Nov 2015
    Posts
    119
    All expressing deep respect, finally I'm very happy!

  7. #7
    Registered User
    Join Date
    Nov 2015
    Posts
    119
    Not so good yet! Yes, small test projects, compile quickly instantly and perfectly. But more projects meet the problem of make 3725 child_info_for::abort: \??\bin\cygiconv-2.dll: Loaded to different address: parent(0x2D0000) != child(0x440000). I do not know well enough to understand the operation of the DLL, not enough how to update cygwin or what to do. Windows in the computer of the seventh, antivirus I do not have. I googled for two hours and haven't decided yet.
    At this point, I'm reinstalling all libraries that have ncurses in their name.
    Last edited by Dmy; 06-15-2019 at 09:37 AM.

  8. #8
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Look for a rebase command in cygwin. Or you need to install and use the 64 bit version of cygwin.

    I am guessing that is the error you get using 32 bit cygwin; I get a similar issues using msys2 32 bit mingw.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 09-07-2018, 02:33 AM
  2. CodeBlocks / GCC / Cygwin Installation Windows 10
    By c00b in forum C Programming
    Replies: 4
    Last Post: 10-11-2016, 03:30 AM
  3. Proper usage of templates
    By Kudose in forum C++ Programming
    Replies: 32
    Last Post: 07-26-2009, 08:10 PM
  4. Proper Usage of the delete Operator
    By thetinman in forum C++ Programming
    Replies: 7
    Last Post: 04-25-2007, 11:53 PM
  5. Setup/Installation programs
    By Robert602 in forum Windows Programming
    Replies: 1
    Last Post: 01-12-2002, 09:54 AM

Tags for this Thread