Loki-Astari / ThorsMongo

C++ MongoDB API and BSON/JSON Serialization library
GNU General Public License v3.0
316 stars 72 forks source link

Cannot open serializeConfig.h #51

Closed rouih closed 5 years ago

rouih commented 5 years ago

Hey, I included the library in my code, and when I try to build I get the following error: "Cannot open include files:'SerializeConfig.h':No such file or directory.' When I search the folder I find this file, only it ends with h.in . What am I doing wrong? I'm running on Windows, VS2012.

Thanks.

Loki-Astari commented 5 years ago

The file SerializeConfig.h is generated by the script configure in the root directory.

On Linux like system the processes to use this library is:

./configure
make
sudo make install

It has been a long time since I have touched a windows machine. So bare with me. To do this on Windows you would need to install the appropriate command line tools. About 10 years ago the easiest way to do that was to install cygwin. I only recommend doing this if you are an experienced developer.

Alternatively you can use the header only version. This should work out of the box for Windows machines. To use this remove the current version of ThorsSerializer you have downloaded and re-fetch the header only version.

git clone --single-branch --branch header-only https://github.com/Loki-Astari/ThorsSerializer.git

This is a version that has no dependencies (so it does not have YAML or Binary serialization).

Please let me know if this works for you.

rouih commented 5 years ago

I tried using the header version, included in my project and I'm having a lot of compilation errors. image

Loki-Astari commented 5 years ago

It's hard to understand those messages without context.

I assume data1, data2, data3 come from the example: see doc/example2.cpp. But why you are getting undeclared identifier I can't tell you without more context.

Not sure what EDQUOT is coming from that is not part of my code.

Converting from const char** to const char* (&)[]. Where is that?
Converting from const char[29] to int. Where is that?
isdigit: is not a memeber of std. That is caused by a missing header file. I would have to know where the error is/ Too many template arguments. This is an issue with your compiler. What are you using and what version is it?

Loki-Astari commented 5 years ago

Note: Your compiler needs to support C++17 to use this code. It may work with C++14 but it has been tested for use with C++17

Loki-Astari commented 5 years ago

Looking at this page: https://docs.microsoft.com/en-us/previous-versions/hh567368(v=vs.140)#featurelist

VS2012 does not even support most C++11 features so I think you have a hard time compiling C++17 code. You could upgrade your compiler or install one of the free compilers.

Loki-Astari commented 5 years ago

Closing. This type of problem is detected by the configuration script. But you need to have an appropriate command line available (or sh equivalent) to use that script.

Loki-Astari commented 1 year ago

You can now use the header only version.