openFrameworks icon indicating copy to clipboard operation
openFrameworks copied to clipboard

ofxAssimp not working if used alongside ofxAssimpModelLoader

Open dimitre opened this issue 1 year ago • 6 comments

Using one or another is OK. I was using both to port some code to the new ofxAssimp

Screenshot 2024-06-21 at 13 21 04

dimitre avatar Jun 21 '24 16:06 dimitre

Hi @dimitre, I quickly made a project using the PG and including both addons, loaded a model of each kind without issues. Do you have some code or direction on how to reproduce this error?

NickHardeman avatar Jun 22 '24 03:06 NickHardeman

Glad to know, thanks. maybe I had something outdated. just found some other issues trying to test this one again :)

dimitre avatar Jul 29 '24 00:07 dimitre

Hey @NickHardeman I'm just again trying new ofxAssimp and having the same compiling issues in XCode / make Errors vary from time to time. my supposition is:

Both addons have identical .h names, like

#include "ofxAssimpTexture.h"

compiler doesn't know which one to pick and have to choose one, sometimes returning errors. one error persists everytime:

Use of undeclared identifier 'aiQuatToOfQuat'

dimitre avatar Jan 08 '25 17:01 dimitre

if I remove only the "src" files from ofxAssimpModelLoader the project compiles ok. but as I'm porting some stuff I will need both

dimitre avatar Jan 08 '25 17:01 dimitre

use make to test. I've just found XCode in master seems to compile ok. for some strange reason the error appear in a branch I'm using for projects. but it is there in any branch using make

dimitre avatar Jan 08 '25 17:01 dimitre

Hmm. It seems like I should be getting the errors you mentioned but I can't reproduce them. I created a project with the project generator and included both add ons. Both Xcode and make compiled for me. I tested with the nightly. Do you have a simple example that might help me re-create it? This is the code I used in the .h file

#include "ofMain.h"
#include "ofxAssimpModel.h"
#include "ofxAssimpModelLoader.h"
#include "ofxAssimpTexture.h"

class ofApp : public ofBaseApp{

	public:
		void setup() override;
		void update() override;
		void draw() override;
	void exit() override;
	
	ofx::assimp::Model mModel;
	ofxAssimpModelLoader mLoader;
	
	ofx::assimp::Texture mTex;
};

NickHardeman avatar Jan 09 '25 02:01 NickHardeman