Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failed in Windows 10 #711

Closed
yannlr37 opened this issue Jul 13, 2023 · 22 comments
Closed

Build failed in Windows 10 #711

yannlr37 opened this issue Jul 13, 2023 · 22 comments

Comments

@yannlr37
Copy link

yannlr37 commented Jul 13, 2023

Hello,

I'm sorry if this is the wrong place for posting but I'm stuck and a help would be appreciated.
I'm new in C++ development. I'm currently working on a project using PostgreSQL database (version 15.3).
My code uses C++20.

A have a dependency to libpqxx as a static library, CMake is used to build the project.
Here is my configuration :

  • CMake 3.26.4
  • g++ 13.1.0
  • OS : Windows 10, using MSYS-ucrt64
  • libpqxx 7.7.5

CMake does not detect any problem but issues come at build time :

====================[ Build | app | Debug ]=====================================
C:\msys64\ucrt64\bin\cmake.exe --build C:\Users\user\Documents\Workspace\Code\MyProject\cmake-build-debug --target app -j 6
[1/30] Building CXX object src/CMakeFiles/app.dir/main.cpp.obj
[2/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/array.cxx.obj
[3/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/binarystring.cxx.obj
[4/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/cursor.cxx.obj
[5/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/blob.cxx.obj
[6/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/connection.cxx.obj
In file included from C:/Users/user/Documents/Workspace/Code/MyProject/lib/db_connection/external/libpqxx-7.7.5/src/connection.cxx:36:
C:/msys64/ucrt64/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp]
   15 | #warning Please include winsock2.h before windows.h
      |  ^~~~~~~
[7/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/encodings.cxx.obj
[8/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/errorhandler.cxx.obj
[9/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/except.cxx.obj
[10/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/field.cxx.obj
[11/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/largeobject.cxx.obj
[12/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/notification.cxx.obj
[13/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/params.cxx.obj
[14/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/result.cxx.obj
[15/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/pipeline.cxx.obj
[16/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/robusttransaction.cxx.obj
[17/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/row.cxx.obj
[18/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/sql_cursor.cxx.obj
[19/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/strconv.cxx.obj
[20/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/stream_from.cxx.obj
[21/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/stream_to.cxx.obj
[22/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/version.cxx.obj
[23/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/subtransaction.cxx.obj
[24/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/time.cxx.obj
[25/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/transaction.cxx.obj
[26/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/wait.cxx.obj
FAILED: src/build-pqxx/src/CMakeFiles/pqxx.dir/wait.cxx.obj 
C:\msys64\ucrt64\bin\g++.exe  -IC:/Users/user/Documents/Workspace/Code/MyProject/cmake-build-debug/src/build-pqxx/include -IC:/Users/user/Documents/Workspace/Code/MyProject/lib/db_connection/external/libpqxx-7.7.5/include -I"C:/Program Files/PostgreSQL/15/include" -I"C:/Program Files/PostgreSQL/15/include/server" -g -std=c++17 -fdiagnostics-color=always -MD -MT src/build-pqxx/src/CMakeFiles/pqxx.dir/wait.cxx.obj -MF src\build-pqxx\src\CMakeFiles\pqxx.dir\wait.cxx.obj.d -o src/build-pqxx/src/CMakeFiles/pqxx.dir/wait.cxx.obj -c C:/Users/user/Documents/Workspace/Code/MyProject/lib/db_connection/external/libpqxx-7.7.5/src/wait.cxx
In file included from C:/Users/user/Documents/Workspace/Code/MyProject/lib/db_connection/external/libpqxx-7.7.5/src/wait.cxx:12:
C:/msys64/ucrt64/include/winsock2.h:15:2: warning: #warning Please include winsock2.h before windows.h [-Wcpp]
   15 | #warning Please include winsock2.h before windows.h
      |  ^~~~~~~
In file included from C:/msys64/ucrt64/include/c++/13.1.0/thread:45,
                 from C:/Users/user/Documents/Workspace/Code/MyProject/lib/db_connection/external/libpqxx-7.7.5/src/wait.cxx:7:
C:/msys64/ucrt64/include/c++/13.1.0/bits/std_thread.h: In function 'bool std::operator==(thread::id, thread::id)':
C:/msys64/ucrt64/include/c++/13.1.0/bits/std_thread.h:330:26: error: no match for 'operator==' (operand types are 'std::thread::native_handle_type' and 'std::thread::native_handle_type')
  330 |     return __x._M_thread == __y._M_thread;
      |            ~~~~~~~~~~~~~ ^~ ~~~~~~~~~~~~~
      |                |                |
      |                |                std::thread::native_handle_type
      |                std::thread::native_handle_type
In file included from C:/msys64/ucrt64/include/c++/13.1.0/iosfwd:42,
                 from C:/msys64/ucrt64/include/c++/13.1.0/bits/std_thread.h:38:
C:/msys64/ucrt64/include/c++/13.1.0/bits/postypes.h:192:5: note: candidate: 'template<class _StateT> bool std::operator==(const fpos<_StateT>&, const fpos<_StateT>&)'
  192 |     operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs)
      |     ^~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/postypes.h:192:5: note:   template argument deduction/substitution failed:
C:/msys64/ucrt64/include/c++/13.1.0/bits/std_thread.h:330:33: note:   'std::thread::native_handle_type' is not derived from 'const std::fpos<_StateT>'
  330 |     return __x._M_thread == __y._M_thread;
      |                                 ^~~~~~~~~
In file included from C:/msys64/ucrt64/include/c++/13.1.0/tuple:38,
                 from C:/msys64/ucrt64/include/c++/13.1.0/bits/std_thread.h:39:
C:/msys64/ucrt64/include/c++/13.1.0/bits/stl_pair.h:812:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
  812 |     operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/stl_pair.h:812:5: note:   template argument deduction/substitution failed:
C:/msys64/ucrt64/include/c++/13.1.0/bits/std_thread.h:330:33: note:   'std::thread::native_handle_type' is not derived from 'const std::pair<_T1, _T2>'
  330 |     return __x._M_thread == __y._M_thread;
      |                                 ^~~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/tuple:1905:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator==(const tuple<_UTypes ...>&, const tuple<_UTypes ...>&)'
 1905 |     operator==(const tuple<_TElements...>& __t,
      |     ^~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/tuple:1905:5: note:   template argument deduction/substitution failed:
C:/msys64/ucrt64/include/c++/13.1.0/bits/std_thread.h:330:33: note:   'std::thread::native_handle_type' is not derived from 'const std::tuple<_UTypes ...>'
  330 |     return __x._M_thread == __y._M_thread;
      |                                 ^~~~~~~~~
In file included from C:/msys64/ucrt64/include/c++/13.1.0/bits/std_thread.h:43:
C:/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:829:5: note: candidate: 'template<class _Tp, class _Dp, class _Up, class _Ep> bool std::operator==(const unique_ptr<_Tp, _Dp>&, const unique_ptr<_Up, _Ep>&)'
  829 |     operator==(const unique_ptr<_Tp, _Dp>& __x,
      |     ^~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:829:5: note:   template argument deduction/substitution failed:
C:/msys64/ucrt64/include/c++/13.1.0/bits/std_thread.h:330:33: note:   'std::thread::native_handle_type' is not derived from 'const std::unique_ptr<_Tp, _Dp>'
  330 |     return __x._M_thread == __y._M_thread;
      |                                 ^~~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:837:5: note: candidate: 'template<class _Tp, class _Dp> bool std::operator==(const unique_ptr<_Tp, _Dp>&, nullptr_t)'
  837 |     operator==(const unique_ptr<_Tp, _Dp>& __x, nullptr_t) noexcept
      |     ^~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:837:5: note:   template argument deduction/substitution failed:
C:/msys64/ucrt64/include/c++/13.1.0/bits/std_thread.h:330:33: note:   'std::thread::native_handle_type' is not derived from 'const std::unique_ptr<_Tp, _Dp>'
  330 |     return __x._M_thread == __y._M_thread;
      |                                 ^~~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:845:5: note: candidate: 'template<class _Tp, class _Dp> bool std::operator==(nullptr_t, const unique_ptr<_Tp, _Dp>&)'
  845 |     operator==(nullptr_t, const unique_ptr<_Tp, _Dp>& __x) noexcept
      |     ^~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:845:5: note:   template argument deduction/substitution failed:
C:/msys64/ucrt64/include/c++/13.1.0/bits/std_thread.h:330:33: note:   'std::thread::native_handle_type' is not derived from 'const std::unique_ptr<_Tp, _Dp>'
  330 |     return __x._M_thread == __y._M_thread;
      |                                 ^~~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/std_thread.h:324:3: note: candidate: 'bool std::operator==(thread::id, thread::id)'
  324 |   operator==(thread::id __x, thread::id __y) noexcept
      |   ^~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/std_thread.h:324:25: note:   no known conversion for argument 1 from 'std::thread::native_handle_type' to 'std::thread::id'
  324 |   operator==(thread::id __x, thread::id __y) noexcept
      |              ~~~~~~~~~~~^~~
In file included from C:/msys64/ucrt64/include/winnt.h:648,
                 from C:/msys64/ucrt64/include/minwindef.h:163,
                 from C:/msys64/ucrt64/include/windef.h:9,
                 from C:/msys64/ucrt64/include/windows.h:69,
                 from C:/Program Files/PostgreSQL/15/include/pthread.h:198,
                 from C:/msys64/ucrt64/include/c++/13.1.0/x86_64-w64-mingw32/bits/gthr-default.h:35,
                 from C:/msys64/ucrt64/include/c++/13.1.0/x86_64-w64-mingw32/bits/gthr.h:148,
                 from C:/msys64/ucrt64/include/c++/13.1.0/bits/std_thread.h:46:
C:/msys64/ucrt64/include/guiddef.h:180:15: note: candidate: 'bool operator==(const GUID&, const GUID&)'
  180 | __inline bool operator== (REFGUID guidOne, REFGUID guidOther) { return !!IsEqualGUID (guidOne, guidOther); }
      |               ^~~~~~~~
C:/msys64/ucrt64/include/guiddef.h:180:35: note:   no known conversion for argument 1 from 'std::thread::native_handle_type' to 'const GUID&'
  180 | __inline bool operator== (REFGUID guidOne, REFGUID guidOther) { return !!IsEqualGUID (guidOne, guidOther); }
      |                                   ^
C:/msys64/ucrt64/include/c++/13.1.0/thread: In function 'bool std::operator<(thread::id, thread::id)':
C:/msys64/ucrt64/include/c++/13.1.0/thread:79:26: error: no match for 'operator<' (operand types are 'std::thread::native_handle_type' and 'std::thread::native_handle_type')
   79 |     return __x._M_thread < __y._M_thread;
      |            ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~
      |                |               |
      |                |               std::thread::native_handle_type
      |                std::thread::native_handle_type
C:/msys64/ucrt64/include/c++/13.1.0/bits/stl_pair.h:835:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)'
  835 |     operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
      |     ^~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/stl_pair.h:835:5: note:   template argument deduction/substitution failed:
C:/msys64/ucrt64/include/c++/13.1.0/thread:79:32: note:   'std::thread::native_handle_type' is not derived from 'const std::pair<_T1, _T2>'
   79 |     return __x._M_thread < __y._M_thread;
      |                                ^~~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/tuple:1947:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator<(const tuple<_UTypes ...>&, const tuple<_UTypes ...>&)'
 1947 |     operator<(const tuple<_TElements...>& __t,
      |     ^~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/tuple:1947:5: note:   template argument deduction/substitution failed:
C:/msys64/ucrt64/include/c++/13.1.0/thread:79:32: note:   'std::thread::native_handle_type' is not derived from 'const std::tuple<_UTypes ...>'
   79 |     return __x._M_thread < __y._M_thread;
      |                                ^~~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:877:5: note: candidate: 'template<class _Tp, class _Dp, class _Up, class _Ep> bool std::operator<(const unique_ptr<_Tp, _Dp>&, const unique_ptr<_Up, _Ep>&)'
  877 |     operator<(const unique_ptr<_Tp, _Dp>& __x,
      |     ^~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:877:5: note:   template argument deduction/substitution failed:
C:/msys64/ucrt64/include/c++/13.1.0/thread:79:32: note:   'std::thread::native_handle_type' is not derived from 'const std::unique_ptr<_Tp, _Dp>'
   79 |     return __x._M_thread < __y._M_thread;
      |                                ^~~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:890:5: note: candidate: 'template<class _Tp, class _Dp> bool std::operator<(const unique_ptr<_Tp, _Dp>&, nullptr_t)'
  890 |     operator<(const unique_ptr<_Tp, _Dp>& __x, nullptr_t)
      |     ^~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:890:5: note:   template argument deduction/substitution failed:
C:/msys64/ucrt64/include/c++/13.1.0/thread:79:32: note:   'std::thread::native_handle_type' is not derived from 'const std::unique_ptr<_Tp, _Dp>'
   79 |     return __x._M_thread < __y._M_thread;
      |                                ^~~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:900:5: note: candidate: 'template<class _Tp, class _Dp> bool std::operator<(nullptr_t, const unique_ptr<_Tp, _Dp>&)'
  900 |     operator<(nullptr_t, const unique_ptr<_Tp, _Dp>& __x)
      |     ^~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/bits/unique_ptr.h:900:5: note:   template argument deduction/substitution failed:
C:/msys64/ucrt64/include/c++/13.1.0/thread:79:32: note:   'std::thread::native_handle_type' is not derived from 'const std::unique_ptr<_Tp, _Dp>'
   79 |     return __x._M_thread < __y._M_thread;
      |                                ^~~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/thread:75:3: note: candidate: 'bool std::operator<(thread::id, thread::id)'
   75 |   operator<(thread::id __x, thread::id __y) noexcept
      |   ^~~~~~~~
C:/msys64/ucrt64/include/c++/13.1.0/thread:75:24: note:   no known conversion for argument 1 from 'std::thread::native_handle_type' to 'std::thread::id'
   75 |   operator<(thread::id __x, thread::id __y) noexcept
      |             ~~~~~~~~~~~^~~
[27/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/util.cxx.obj
[28/30] Building CXX object src/build-pqxx/src/CMakeFiles/pqxx.dir/transaction_base.cxx.obj
ninja: build stopped: subcommand failed.

The same code builds and runs perfectly on Linux (using GCC and CMake too).

I can't figure out where the issue comes from. Is this related to a bad configuration of the toolchain on Windows ?
Is this a known issue ?

Thanks in advance

@jtv
Copy link
Owner

jtv commented Jul 13, 2023

Yes, this is a known problem with MinGW! Basically that header seems to have been broken for years. And I keep thinking that we managed to work around it.

Could you perhaps try it with the very latest libpqxx code from a "git clone" of the repo?

@yannlr37
Copy link
Author

Hi !
Thank you for the quick reply !

I tried with the lastest master git-clone version from the repo, but it still gives the same error unfortunately.
Is there a workaround on Windows ? Maybe using something else than MinGW but still using G++ ?
Ideally, I would need a compatibility with Unix systems

@jtv
Copy link
Owner

jtv commented Jul 13, 2023

Try this...

In your build tree, after running "cmake," look for the headers in include/pqxx/ that have this line, and comment it out:

#define PQXX_HAVE_SLEEP_FOR

In a CMake build, three headers will have that line: config-internal-compiler.h, config-public-compiler.h, and config-internal-libpq.h. You'll have to comment out all three of those lines. (There's also a similar line in config_cmake.h.in, but there's no need to edit that one.)

@yannlr37
Copy link
Author

Hi,

Your workaround works ! Thanks a lot !
Now my code can compile.

Just for my knowledge, what does this action imply on the Libpqxx or PostgreSQL operation ?
Can it result in malfunctions or some strange behavior ?

@yannlr37
Copy link
Author

yannlr37 commented Jul 14, 2023

My test code is very simple : just initiate a connection with a local Postgres database. But it's not working. Program run return -1.
Here my test program :

#include <iostream>
#include <pqxx/pqxx>

int main()
{
try {
    pqxx::connection c{"dbname = test user = postgres password=xxx hostaddr=127.0.0.1 port=5432"};
} catch () {
    std::cout << "Cannot connect to database" << std::end;
}
return 0;
}

Is there a chance that the problem comes from my PostgreSQL installation ?

@jtv
Copy link
Owner

jtv commented Jul 14, 2023

Hi,

Your workaround works ! Thanks a lot ! Now my code can compile.

Just for my knowledge, what does this action imply on the Libpqxx or PostgreSQL operation ? Can it result in malfunctions or some strange behavior ?

Should be fine... The code to "sleep" (e.g. when you wait for notifications) may be a bit less efficient than it could be.

@jtv
Copy link
Owner

jtv commented Jul 14, 2023

Is there a chance that the problem comes from my PostgreSQL installation ?

Don't just catch () -- catch std::exception and call its what() method to get the error message. If you print that to std::cerr, debugging will be a bit easier.

@jtv
Copy link
Owner

jtv commented Jul 14, 2023

Oh, and... you wrote std::end where you probably meant std::endl.

@tt4g
Copy link
Contributor

tt4g commented Jul 15, 2023

We cannot predict from the source code why your machine cannot connect to the database.
Please apply the following changes and tell us what you see in the reason (ex.what()) for not being able to connect to the databas

 #include <iostream>
 #include <pqxx/pqxx>

 int main()
 {
 try {
     pqxx::connection c{"dbname = test user = postgres password=xxx hostaddr=127.0.0.1 port=5432"};
-} catch () {
-    std::cout << "Cannot connect to database" << std::end;
+} catch (std::exception const &ex) {
+   std::cout << "Cannot connect to database" << std::endl;
+   std::cout << "what: " << ex.what() << std::endl;
+    return 1
 }
 return 0;
 }

@yannlr37
Copy link
Author

Hi guys,
Thank you ! I applied the fix.
Unfortunately, the result is the same (return -1, no exception catched, no what() error message shown).

But you may be right, something else sould be missing with my installation. I'll check that from my side as you cannot know what is installed or not installed on my computer.

That you guys for your time.
Thank you @jtv for the workaround :)

@jtv
Copy link
Owner

jtv commented Jul 15, 2023

That sounds like your code never really started at all. Because if your application tried and failed to connect, you'd be getting a 1, not a -1.

So I think it's the operating system trying to tell you something like "I was unable to load a library that this application needed."

@jtv
Copy link
Owner

jtv commented Jul 15, 2023

On a sidenote, the warning "Please include winsock2.h before windows.h" bothers me as well. That warning starts in src/wait.cxx line 12, but that does not look like the right line in the current code. And the warning does not look valid: the #warning statement is in winsock2.h... which complains that we didn't include winsock2.h first!

Is that warning still there with the latest libpqxx code?

@yannlr37
Copy link
Author

You're right.
Actually, the library is not installed globally on my system. It's installed within the project directly, in a "external" folder. Then I include it using CMake. This system works perfectly on Linux, but I might be missing something on Windows.

Thank you @jtv, I'll investigate about it. You can consider the issue closed.

@yannlr37
Copy link
Author

My bad I didn't notice your last message.

Actually no, this warning has gone when using the latest libpqxx code

@yannlr37
Copy link
Author

I noticed that the code runs when not using any pqxx functionality, simply including the pqxx library with : #include <pqxx/pqxx> . It fails (return -1) when I try to init a connection.

Does it mean something interesting ?

@jtv
Copy link
Owner

jtv commented Jul 17, 2023

Glad to hear that the warning is gone with the latest code! I'm eager to release 7.8.0 soon, and I would very much like the release to resolve this problem.

For the strange behaviour with the failure, I think a debugger may be called for. It's important to bear in mind that with a DLL (a "shared library" in Unix parlance) the loader (the part of the OS that loads your application when you try to run it) has to be able to find that library at that time, not just when you build the application.

@jtv
Copy link
Owner

jtv commented Jul 23, 2023

@yannlr37 did you find any solution to this? My only guess so far is that the OS either couldn't find one of the DLLs it needed at runtime when you tried to run the application, or it couldn't link the DLL.

I believe Windows looks for DLLs in the current directory, and in the directories specified by the PATH variable.

@yannlr37
Copy link
Author

Hi @jtv , l’m sorry I didn’t write, but yes you ´re right. Some DLL where missing : one related to Postgres itself (it was there but not in the PATH) and a second (libintl-9.dll) that I had to install. I did not see it in the first place because my IDE didn’t tell anything. Informations were given by a Windows dialog when app launched from console.

Once these DLL installed and linked, it all worked. However, I still need to comment the lines you told me in the files generated by CMake.

Thanks a lot for your help !

@jtv
Copy link
Owner

jtv commented Jul 26, 2023

@yannlr37 I hope that 7.8.1 builds out of the box for you.

@yannlr37
Copy link
Author

Hi @jtv , unfortunately version 7.8.1 still gives me the no match for 'operator==' error
I still need to comment the lines you told me

@jtv
Copy link
Owner

jtv commented Jul 27, 2023

Gah!

I'm going to have to find myself a Windows system with MinGW so I can look for a reliable way to reproduce the problem.

@jtv
Copy link
Owner

jtv commented Aug 12, 2023

We've gone through a few different problems in this ticket, so to avoid confusion, I'll just close this one. If the MinGW threading problem comes up again, we can have a separate ticket for that.

@jtv jtv closed this as completed Aug 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants