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

Project imported with QtCreator has missing src files #4987

Open
hamoid opened this issue Mar 13, 2016 · 3 comments
Open

Project imported with QtCreator has missing src files #4987

hamoid opened this issue Mar 13, 2016 · 3 comments

Comments

@hamoid
Copy link
Contributor

hamoid commented Mar 13, 2016

git clone https://github.com/npisanti/ofxPDSP.git
git clone https://github.com/danomatika/ofxMidi.git
git clone https://github.com/npisanti/ofxSIMDFloats.git

I import ofxPDSP/example-midi_polysynth into QtCreator and click run, but it fails to compile. See error screenshot here.

If I type make Debug on the command line, the program compiles successfully.

I'm on 64bit ArchLinux, OF 0.9.3 from GitHub, QtCreator 3.6.0.

Update: by looking at the .qbs project file, I see two files from src/ are missing:

    files: [
        'src/main.cpp',
        'src/ofApp.cpp',
        'src/ofApp.h',
    ]

The two missing files are voice.cpp and voice.h.

@hamoid hamoid changed the title Project imported with QtCreator fails to compile, but compiles on command line Project imported with QtCreator has missing src files Mar 13, 2016
@hamoid
Copy link
Contributor Author

hamoid commented Mar 14, 2016

Looking at the import wizard, it looks to me like it always includes the same 3 files found in src/.

At the bottom of this document https://doc.qt.io/qtcreator/creator-project-wizards-json.html it mentions a scanner, which builds a list of files found in a folder, and I don't see it used in the wizard (maybe I missed it).

I don't understand how this scanner works. Here's the source code.

@arturoc
Copy link
Member

arturoc commented Mar 14, 2016

yes the project importer is kind of limited at the moment, it only adds the standard files. i didn't see any option for reading the contents of the folder when i created the wizard. i might have missed it or it might be something they've added afterwards, in any case it would be a great addition to have. if you want to take a look? otherwise i'll try to implement it when i have a moment

@hamoid
Copy link
Contributor Author

hamoid commented Mar 14, 2016

I spent a long time trying to figure it out, but the documentation is very limited. In

/usr/share/qtcreator/templates/wizards/projects/vcs/*/wizard.json

they use the Scanner generator, but I have no idea where is the resulting list of files accessible. I thought of using JavaScript to get the list of files placing that into "options", but then I also could not find any documentation about the syntax for those JS calls. For instance I see Util.filename, Util.isDirectory, Vcs.isConfigured but I don't know what that Util or Vcs refers to. Knowing that I could do something like Util.listFiles(...) and include that list inside the generated qbs file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants