diff --git a/Setup.hs b/Setup.hs
--- a/Setup.hs
+++ b/Setup.hs
@@ -1,10 +1,11 @@
-#!/usr/bin/runhaskell 
+#!/usr/bin/runhaskell
 module Main where
 
 import Control.Monad
 import Data.Char
 import Data.List
 import Data.Maybe
+import Data.String
 
 import qualified Distribution.InstalledPackageInfo as I
 import qualified Distribution.ModuleName as ModuleName
@@ -13,6 +14,7 @@
 import Distribution.Simple.BuildPaths
 import Distribution.Simple.Compiler
 import Distribution.Simple.LocalBuildInfo
+import Distribution.Simple.PreProcess
 import Distribution.Simple.Program
 import Distribution.Simple.Program.Ar
 import Distribution.Simple.Program.Ld
@@ -150,8 +152,8 @@
       createDirectoryIfMissingVerbose verb True (takeDirectory o)
       runProgram verb moc $ [i,"-o",o] ++ args) $ zip incs cpps
   -- Add the moc generated source files to be compiled
-  return build {cSources = cpps ++ cSources build,
-                ccOptions = "-fPIC" : ccOptions build}
+  return build {cxxSources = cpps ++ cxxSources build,
+                cxxOptions = "-fPIC" : cxxOptions build}
 
 needsGHCiFix :: PackageDescription -> LocalBuildInfo -> Bool
 needsGHCiFix pkgDesc lbi =
@@ -183,7 +185,9 @@
         hsObjs = map ((bDir </>) . (<.> "o")) ms
         lname  = getHSLibraryName $ componentUnitId clbi
     stubObjs <- fmap catMaybes $
-      mapM (findFileWithExtension ["o"] [bDir]) $ map (++ "_stub") ms
+      -- fromString is for compatibility between String (Cabal-3.10)
+      -- and Suffix (Cabal-3.12)
+      mapM (findFileWithExtension [fromString "o"] [bDir]) $ map (++ "_stub") ms
     case os of
       "mingw32" -> do
         createArLibArchive verb lbi (bDir </> lname <.> "a") (stubObjs ++ hsObjs)
@@ -196,7 +200,7 @@
       ["-shared","-o",bDir </> (mkGHCiFixLibName pkgDesc platform)] ++
       (ldOptions bi) ++ (map ("-l" ++) $ extraLibs bi) ++
       (map ("-L" ++) $ extraLibDirs bi) ++
-      (map ((bDir </>) . flip replaceExtension objExtension) $ cSources bi))
+      (map ((bDir </>) . flip replaceExtension objExtension) $ cxxSources bi))
     return ()
 
 mocProgram :: Program
@@ -232,7 +236,7 @@
     -- Stack looks in the non-dyn lib directory
     installOrdinaryFile verb (bDir </> file) (libdir instDirs </> file)
 
-regWithQt :: 
+regWithQt ::
   PackageDescription -> LocalBuildInfo -> UserHooks -> RegisterFlags -> IO ()
 regWithQt pkg@PackageDescription { library = Just lib } lbi _ flags = do
   let verb    = fromFlag $ regVerbosity flags
@@ -266,7 +270,7 @@
               opts  = defaultRegisterOptions
           in registerPackage verb comp progs pkgDb instPkgInfo' opts
 regWithQt pkgDesc _ _ flags =
-  setupMessage (fromFlag $ regVerbosity flags) 
+  setupMessage (fromFlag $ regVerbosity flags)
     "Package contains no library to register:" (packageId pkgDesc)
 
 instWithQt ::
@@ -289,16 +293,16 @@
   mapBI :: (BuildInfo -> BuildInfo) -> a -> a
 
 instance HasBuildInfo Library where
-  mapBI f x = x {libBuildInfo = f $ libBuildInfo x} 
+  mapBI f x = x {libBuildInfo = f $ libBuildInfo x}
 
 instance HasBuildInfo Executable where
-  mapBI f x = x {buildInfo = f $ buildInfo x} 
+  mapBI f x = x {buildInfo = f $ buildInfo x}
 
 instance HasBuildInfo TestSuite where
-  mapBI f x = x {testBuildInfo = f $ testBuildInfo x} 
+  mapBI f x = x {testBuildInfo = f $ testBuildInfo x}
 
 instance HasBuildInfo Benchmark where
-  mapBI f x = x {benchmarkBuildInfo = f $ benchmarkBuildInfo x} 
+  mapBI f x = x {benchmarkBuildInfo = f $ benchmarkBuildInfo x}
 
 maybeMapM :: (Monad m) => (a -> m b) -> (Maybe a) -> m (Maybe b)
 maybeMapM f = maybe (return Nothing) $ liftM Just . f
diff --git a/cbits/Object.cpp b/cbits/Object.cpp
--- a/cbits/Object.cpp
+++ b/cbits/Object.cpp
@@ -70,7 +70,7 @@
         mObject = new HsQMLObject(this, engine);
 
         HSQML_LOG(5,
-            QString().sprintf("New QObject, class=%s, id=%d, qptr=%p.",
+            QString().asprintf("New QObject, class=%s, id=%d, qptr=%p.",
             mKlass->name(), mSerial, mObject));
     }
 
@@ -86,7 +86,7 @@
     Q_ASSERT(gManager->isEventThread());
 
     HSQML_LOG(5,
-        QString().sprintf("Release QObject, class=%s, id=%d, qptr=%p.",
+        QString().asprintf("Release QObject, class=%s, id=%d, qptr=%p.",
         mKlass->name(), mSerial, mObject));
 
     mObject = NULL;
@@ -101,7 +101,7 @@
         mObject->setGCLock();
 
         HSQML_LOG(5,
-            QString().sprintf("Lock QObject, class=%s, id=%d, qptr=%p.",
+            QString().asprintf("Lock QObject, class=%s, id=%d, qptr=%p.",
             mKlass->name(), mSerial, mObject));
     }
 }
@@ -115,7 +115,7 @@
             mObject->clearGCLock();
 
             HSQML_LOG(5,
-                QString().sprintf("Unlock QObject, class=%s, id=%d, qptr=%p.",
+                QString().asprintf("Unlock QObject, class=%s, id=%d, qptr=%p.",
                 mKlass->name(), mSerial, mObject));
         }
         else {
@@ -160,7 +160,7 @@
     int count = mRefCount.fetchAndAddOrdered(1);
 
     HSQML_LOG(count == 0 ? 3 : 4,
-        QString().sprintf("%s ObjProxy, class=%s, id=%d, src=%s, count=%d.",
+        QString().asprintf("%s ObjProxy, class=%s, id=%d, src=%s, count=%d.",
         count ? "Ref" : "New", mKlass->name(),
         mSerial, cRefSrcNames[src], count+1));
 
@@ -190,7 +190,7 @@
     int count = mRefCount.fetchAndAddOrdered(-1);
 
     HSQML_LOG(count == 1 ? 3 : 4,
-        QString().sprintf("%s ObjProxy, class=%s, id=%d, src=%s, count=%d.",
+        QString().asprintf("%s ObjProxy, class=%s, id=%d, src=%s, count=%d.",
         count > 1 ? "Deref" : "Delete", mKlass->name(),
         mSerial, cRefSrcNames[src], count));
 
diff --git a/hsqml.cabal b/hsqml.cabal
--- a/hsqml.cabal
+++ b/hsqml.cabal
@@ -1,6 +1,6 @@
 cabal-version:      3.8
 Name:               hsqml
-Version:            0.3.6.1
+Version:            0.3.7.0
 Build-type:         Custom
 License:            BSD-3-Clause
 License-file:       LICENSE
@@ -59,8 +59,8 @@
     Setup-depends:
         base             == 4.*,
         template-haskell == 2.*,
-        Cabal            >= 3.8 && < 4.0,
-        filepath         >= 1.4.300 && < 1.5
+        Cabal            >= 3.8 && <3.12,
+        filepath         >= 1.4.300 && < 1.6
 
 common extensions
   default-extensions:
@@ -81,14 +81,12 @@
     import: ghc-options
     Build-depends:
         base         == 4.*,
-        bytestring   >= 0.11.5 && < 0.12,
+        bytestring   >= 0.11.5 && < 0.13,
         containers   >= 0.7 && < 0.9,
-        directory    >= 1.3.9 && < 1.4,
-        filepath     >= 1.4.300 && < 1.5,
+        filepath     >= 1.4.300 && < 1.6,
         text         >= 2.1.2 && < 2.2,
         tagged       >= 0.8.9 && < 0.9,
-        transformers >= 0.6.2 && < 0.7,
-        QuickCheck >= 2.16.0 && < 2.17,
+        transformers >= 0.6.1 && < 0.7,
     Exposed-modules:
         Graphics.QML
         Graphics.QML.Debug
@@ -110,7 +108,7 @@
         Graphics.QML.Internal.Objects
         Graphics.QML.Internal.Types
     Hs-source-dirs: src
-    C-sources:
+    Cxx-sources:
         cbits/Canvas.cpp
         cbits/Class.cpp
         cbits/ClipboardHelper.cpp
@@ -148,6 +146,7 @@
     else
         if os(darwin) && !flag(UsePkgConfig)
             Frameworks: QtCore QtGui QtWidgets QtNetwork QtQml QtQuick
+            Include-dirs: /QT_ROOT/include
             CC-options: -F /QT_ROOT/lib
             Extra-framework-dirs: /QT_ROOT/lib
         else
