Xlsx IO library (from sourceforge) issue - c++

xlsx io from sourceforge
Anyone know how to actually use this library?
I took the time to download it and include it with a project.
The problem is, when I try to compile, if I attempt to call any of the library's functions, I get the dreaded linking error: "unresolved symbols".
I'm using Visual Studio Express 2013.
To make this more clear, here's some sample code I've tried (that creates the linker error).
#include "xlsxio_read.h"
int main(void){
xlsxioreader x = xlsxioread_open("input.xlsx");
}
And before anyone asks the standard inane questions, Yes I put the header files and their dll's into the appropriate directories before trying to include or use anything.

Related

Manually set IntelliSense include directories (C++)

I'm using Vistual Studio Community 2019 to build (CMake) and debug C++ code.
Compilation and debugging both happen in WSL and work fine.
The problem is IntelliSense, which keeps complaining that it's not able to find the necessary headers.
Visual Studio is able to zip all necessary headers from the WSL and download it.
I even checked the local copy folders to see if they were correct. And they are.
I even tried to mess around with CppProperties.json in order to point it to the downloaded headers (which should be done regardless), but with no success.
What am I missing?
I figured out what was happening.
IntelliSense needs the "full path" to the header file you're including.
For instance, in my case, instead of using
#include <lua.hpp>
I had to use
#include <lua5.2/lua.hpp>
In order for it to work you have to have things set up as I described above. Feel free to comment if you're having trouble. :)

How to compile or use a library that downloaded online

I am unfamiliar with C++ but I got a project that needed to deal with it.
I need to use a library available online, RtAudio, and of course I need to
import it in my program.
My question is, how do I use/do it?
Here is my understanding on the library, I am sure that I am totally wrong, but
just to tell where I am.
I think i cannot use the file that I download directly but change it to a lib file and a dll file (as I have use some other precompile library before and it only require a dll and lib file[.h too of course]; I know how to put these into MSVC 2015 and use it).
And also I think in order to compile the library into dll and lib file I need to do something with the follow file in the cmd in window: configure, install, and makefile.in
I am desperate as I had already given up using another library before as I do not know how to deal with this, therefore it will be nice that if anyone can give any help. Thanks.

Building MuPdf and registering document handlers

Here we have a question, an answer and some happy people.
But I've got a different situation,
I'm coding in C++ and I'm going to build MuPdf myself.
So, when i add fz_register_document_handlers function before fz_open_document_with_stream I'll get 5 unresolved external symbols for these
_opj_image_destroy (2 times)
_opj_copy_image_header
_opj_image_comp_header
_opj_image_create
I can get rid of 3 of them by linking openjpeg\libopenjpeg\image.c but _opj_image_destroy is stock on my compiling error list!
[UPDATE]
Mupdf version: 1.6
I don't know that it's a right way or not but I created a visual studio project, named Native and put Mupdf source in it and try to compile.
Then i'm using it's header in other c++ project (and using declare "C" in it) and linked Native to it.
It works fine until i trying to open a file as a stream and not file address.
So, my project failed with this error: "No document handlers registered".This error is caused by document.c file.
I searched and find the page which was linked above and I changed the source.
The compile errors appeared after that change!
Thanks for your help and sorry for my English...
Firstly, you haven't said what version of MuPDF you are using. I'm going to assume you're using the latest version from git (currently 1.6 as of 1 Feb 2015).
Secondly, you've not told us anything of use about how you're building MuPDF. Without knowing exactly what you've changed, it's hard to speculate what you're doing wrong.
If you're compiling vanilla .c files with a c++ compiler then you probably need to do some wrapping of files with extern "C" declarations.
Feel free to get in touch on the #ghostscript irc channel and tell us more.
[Update]
It sounds to me like you are missing the openjpeg decoder. You can't just add a single file from the openjpeg source and expect it to magically work.
Why are you creating your own Visual Studio project when we provide one for you already? platform/win32/mupdf.sln

Using boost in a xll add-in created by xlw in c++

I am trying to use boost functions in a xll add-in that I am creating using xlw in c++. I have included the boost directory in the include directories section in the XLL property pages --> Configuration Pages --> VC++ Directories.
however, when I try to use the boost object "boost::" no member functions appear and in the bottom left hand side of the screen I get a message "IntelliSense: 'Unavailable for C++/CLI'"
Has anyone ever encountered this issue before and knows how to get around it?
Thanks in advance for your help
I think the Intellisense error message is not directly related to boost and xlw.
If you are using VS2010, please have a look at the following link:
Why is Intellisense "Unavailable for C++/CLI"?
You should still be able to use boost and compile even without Intellisense.

(Special case, might related to VC directory setting) fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory

I was bothered by the error
fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory
for quite a while, I tried my best to search all the relevant cases but couldn't find a good answer for me.
My situation is, I have a simple piece of code with a couple of dependencies to build, after setting up all the include folders, I'm just experiencing this compiler error all the time. Two weird questions I cannot answer,
There is another win32 console project somebody else set up for this project, working! I'm trying to copy all of his settings (the command line options are exactly the same, all env variables are same, and I run two projects on same visual studio), but just have this 1083 error in my own project.
I was playing around with the settings, one time I changed the platform from Active(Win32) to Win32, then suddenly the compiling works, but after that time I couldn't reproduce it any more.
The thing is, I'm guessing VS in my project might go to a wrong directory
C:\Program Files\Microsoft Visual Studio 8\VC\include instead of C:\Program Files (x86)\Microsoft Visual Studio 8\VC\include
not quite sure, and earlier I was trying to compiling using a building script and make files, same error happened because there people didn't update the correct VS directory.
Sorry I couldn't provide the source code here, and it won't be helpful either since it has a couple of levels of dependency. But I hope based on my description some one might give some idea which direction should I go or spend time on.
iostream.h is deprecated, it should be just iostream:
#include <iostream>
See <iostream> vs. <iostream.h> vs. "iostream.h"
In this version of visual studio (and also in any modern C++ IDE) standard library headers are named without any suffices (iostream instead of iostream.h, string instead of string.h, etc)
Also, C library headers are named like cxxx instead of xxx.h, for example, you should include cstdlib instead of stdlib.h
When you say that you ran your project and the other person's (working) project on the "same visual studio", do you mean the same installation or the same version? If they're not on the same installation, then even if the project settings are copied exactly, it could be that the installation settings are different and that that's what's causing the problem. This may be a long shot, but I'll do my best to explain.
I came across your question because I had a slightly similar problem. Even without dependencies, I couldn't get a simple "Hello, World" program to compile. I used iostream without ".h" as many people suggested and still got C1083. Then I realized that when I installed VS, I unchecked one of the basic features, called "Visual C++ Run-Time Libraries". So I modified the installation to include this feature. Afterwards compilation proceeded successfully and the problem was solved. Is it possible that your installation is missing something that the other person has? If you can get your project to work on this other person's installation, then that might help to pinpoint the problem. Hope this helps. Good luck!
Does a simple hello world program that uses <iostream> compile and run fine?
If so, the Visual Studio system settings are fine and there is something probably wrong in either the project settings or the source.
You can eliminate the source by checking to make sure that the code is actually using #include <iostream> as opposed to #include <iostream.h>. Once that is done, make sure your header search paths point to the right place (the same as the default values in your hello world project for a start)