Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - dzeek

Pages: [1]
1
QB64 Discussion / Re: Support for New Mac M1-based Systems
« on: February 05, 2021, 04:13:55 pm »
@FellippeHeitor  Understood. Thanks for the quick reply.

2
QB64 Discussion / Support for New Mac M1-based Systems
« on: February 05, 2021, 02:22:50 pm »
Does QB64 support the new Mac M1-based systems (Macbook Air specifically)?
Sorry if this has already been answered but I could not find it.

Thank you

3
QB64 Discussion / Re: Compile Error using DLL
« on: June 09, 2020, 08:19:19 am »
"_declspec(dllexport)" is MSVC-specific syntax. QB64 always uses gcc/clang, so just fiddle with that #if on line 6 to use the other version (the __attribute__ one).

Then you can deal with whatever the next error is :)

Thanks. That worked.

4
QB64 Discussion / Compile Error using DLL
« on: June 08, 2020, 11:15:52 am »
I'm getting the following compile error when trying to use a DLL and .h file that was provided to me. I can't seem to figure out what is causing the error. Any help would be appreciated.

Error file
Code: QB64: [Select]
  1. In file included from ..\\temp\\regsf.txt:2,
  2.                  from qbx.cpp:1076:
  3. D:/STITCHORI/Windows/v1/DPPanoMakerProDLLMain.h:8:29: error: expected constructor, destructor, or type conversion before '(' token
  4.  #define DLL_EXPORT _declspec(dllexport)
  5.                              ^
  6. D:/STITCHORI/Windows/v1/DPPanoMakerProDLLMain.h:16:12: note: in expansion of macro 'DLL_EXPORT'
  7.  extern "C" DLL_EXPORT int ProMakePanoramaBuf(int threadNum, int memType, void* hRawFileReader, const char* outputDir, const char* fileNo,
  8.             ^~~~~~~~~~
  9. compilation terminated due to -Wfatal-errors.
  10.  

My QB64 Program:
Code: QB64: [Select]
  1. _TITLE "STITCH v1 - Stitch ORI files"
  2.  
  3. DECLARE DYNAMIC LIBRARY ".\PanoMakerPro"
  4.  
  5. DECLARE LIBRARY ".\DPPanoMakerProDLLMain"
  6.     FUNCTION ProInitRawFileReader& (fileBuf AS STRING, BYVAL fileSize)
  7.     FUNCTION ProMakePanoramaBuf& (BYVAL threadNum AS INTEGER, BYVAL memType AS INTEGER, BYVAL hRawFileReader, outputDir AS STRING, fileNo AS STRING, BYVAL hdrSel AS INTEGER, BYVAL outputType AS INTEGER, BYVAL colorMode AS INTEGER, BYVAL extendMode AS INTEGER, BYVAL outputJpgType AS INTEGER, BYVAL outputQuality AS INTEGER, BYVAL stitchMode AS INTEGER, BYVAL gyroMode AS INTEGER, BYVAL templateMode AS INTEGER, templateFileName AS STRING, BYVAL logoAngle AS DOUBLE, BYVAL luminance AS DOUBLE, BYVAL contrastRatio AS DOUBLE, BYVAL gammaMode AS INTEGER, BYVAL wbMode AS INTEGER, BYVAL wbConfB AS DOUBLE, BYVAL wbConfG AS DOUBLE, BYVAL wbConfR AS DOUBLE, BYVAL saturation AS DOUBLE, dbgData AS STRING)
  8.  
  9. DIM outputDir AS STRING
  10. DIM fileNo AS STRING
  11. DIM dbgData AS STRING
  12. DIM result AS LONG
  13. DIM handle AS LONG
  14. DIM fileBuf AS STRING
  15. DIM fileSize AS LONG
  16.  
  17.  
  18. outputDir = ".\"
  19. fileNo = "2020-05-18_07.20.51"
  20.  
  21. fileBuf = ""
  22. OPEN fileNo + ".ori" FOR BINARY AS #F%
  23.     GET #F%, , Dat$
  24.     fileBuf = fileBuf + Dat$
  25.  
  26. fileSize = LEN(fileBuf)
  27.  
  28. handle = ProInitRawFileReader(fileBuf, fileSize)
  29. result = ProMakePanoramaBuf(4, 0, handle, outputDir, fileNo, 10, 0, 1, 0, 1, 90, 0, 0, 0, "", -1, 1.2, 1.3, 1, 0, 1.0, 1.0, 1.0, 1.0, dbgData)
  30.  
  31.  

DPPanoMakerProDLLMain.h file
Code: QB64: [Select]
  1. //#ifndef EXE_OUT
  2.  
  3. #ifndef __PANOMAKERPRODLLMAIN_H__
  4. #define __PANOMAKERPRODLLMAIN_H__
  5.  
  6. #if defined WIN32
  7.  
  8. #define DLL_EXPORT _declspec(dllexport)
  9.  
  10. #else
  11.  
  12. #define DLL_EXPORT __attribute__ ((visibility("default")))
  13.  
  14. #endif
  15.  
  16. extern "C" DLL_EXPORT int ProMakePanoramaBuf(int threadNum, int memType, void* hRawFileReader, const char* outputDir, const char* fileNo,
  17.         int hdrSel, int outputType, int colorMode, int extendMode, int outputJpgType, int outputQuality, int stitchMode, int gyroMode, int templateMode, const char* templateFileName,
  18.         double logoAngle, double luminance, double contrastRatio, int gammaMode, int wbMode, double wbConfB, double wbConfG, double wbConfR, double saturation, unsigned char* dbgData);
  19.  
  20. extern "C" DLL_EXPORT void* ProInitRawFileReader(unsigned char* fileBuf, int fileSize);
  21.  
  22. extern "C" DLL_EXPORT int ProUpdateRawFileReader(void* hRawFileReader, int bufWrPos);
  23.  
  24. extern "C" DLL_EXPORT int ProCleanRawFileReader(void* hRawFileReader);
  25.  
  26. extern "C" DLL_EXPORT double ProGetProgress(double lastProgress, unsigned char* dbgData);
  27.  
  28. #endif
  29.  
  30. //#endif
  31.  

5
QB64 Discussion / Files needed to run Compiled EXE on MacOS
« on: May 14, 2020, 06:00:02 am »
I need to distribute an EXE that I compiled in QB64 on MacOS to other MacOS users. What files do I need to include with the EXE in order for them to be able to run it?

6
QB64 Discussion / Re: Path for user's desktop on MacOS
« on: May 13, 2020, 11:46:49 am »
I found a solution. ENVIRON$("HOME") returns a string of the users HOME path. For example "/Users/test". I can then append "/Desktop" to get the path to the users desktop.

7
QB64 Discussion / [SOLVED] Path for user's desktop on MacOS
« on: May 13, 2020, 10:27:02 am »
I'm converting a QB64 program I wrote for Windows 10 to MacOS. The Windows version allows the user to drag and drop the path to a user's folder on the program's EXE file. The program then stores files in that folder. Since QB64 for MacOS does not support drag and drop of files or folders I was thinking to use a predefined folder name on the user's desktop. Is there a call I can use to get the path to the user's desktop or a string I can use in an OPEN statement for the path to the user's desktop?

Pages: [1]